mongoose-auto-increment
Advanced tools
Comparing version 3.0.4 to 3.0.5
{ | ||
"name": "mongoose-auto-increment", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"description": "This plugin allows you to auto-increment any field on any mongoose schema that you wish.", | ||
@@ -16,6 +16,6 @@ "repository": { | ||
"devDependencies": { | ||
"async": "*", | ||
"chai": "*", | ||
"mocha": "*", | ||
"mongoose": "*", | ||
"chai": "*", | ||
"async": "*" | ||
"mongoose": "^3.8.12" | ||
}, | ||
@@ -22,0 +22,0 @@ "keywords": [ |
@@ -40,3 +40,3 @@ var async = require('async'), | ||
var User = conn.model('User', userSchema), | ||
user = new User({ name: 'Charlie', dept: 'Support' }), | ||
user1 = new User({ name: 'Charlie', dept: 'Support' }), | ||
user2 = new User({ name: 'Charlene', dept: 'Marketing' }); | ||
@@ -47,3 +47,3 @@ | ||
user1: function (cb) { | ||
user.save(cb); | ||
user1.save(cb); | ||
}, | ||
@@ -58,4 +58,4 @@ user2: function (cb) { | ||
should.not.exist(err); | ||
results.user1.should.have.property('_id', 0); | ||
results.user2.should.have.property('_id', 1); | ||
results.user1[0].should.have.property('_id', 0); | ||
results.user2[0].should.have.property('_id', 1); | ||
done(); | ||
@@ -91,4 +91,4 @@ } | ||
should.not.exist(err); | ||
results.user1.should.have.property('userId', 0); | ||
results.user2.should.have.property('userId', 1); | ||
results.user1[0].should.have.property('userId', 0); | ||
results.user2[0].should.have.property('userId', 1); | ||
done(); | ||
@@ -125,4 +125,4 @@ } | ||
should.not.exist(err); | ||
results.user1.should.have.property('_id', 3); | ||
results.user2.should.have.property('_id', 4); | ||
results.user1[0].should.have.property('_id', 3); | ||
results.user2[0].should.have.property('_id', 4); | ||
done(); | ||
@@ -159,4 +159,4 @@ } | ||
should.not.exist(err); | ||
results.user1.should.have.property('_id', 0); | ||
results.user2.should.have.property('_id', 5); | ||
results.user1[0].should.have.property('_id', 0); | ||
results.user2[0].should.have.property('_id', 5); | ||
done(); | ||
@@ -204,5 +204,5 @@ } | ||
results.count1.should.equal(0); | ||
results.user1.should.have.property('_id', 0); | ||
results.user1[0].should.have.property('_id', 0); | ||
results.count2.should.equal(1); | ||
results.user2.should.have.property('_id', 1); | ||
results.user2[0].should.have.property('_id', 1); | ||
results.count3.should.equal(2); | ||
@@ -244,3 +244,3 @@ done(); | ||
should.not.exist(err); | ||
results.user.should.have.property('_id', 0); | ||
results.user[0].should.have.property('_id', 0); | ||
results.count1.should.equal(1); | ||
@@ -247,0 +247,0 @@ results.reset.should.equal(0); |
23230