Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

clean up test

  • Loading branch information...
commit 8653c73a7b741eb03fb96f07495d603c1090e53c 1 parent 83d4590
@aheckmann aheckmann authored
Showing with 8 additions and 7 deletions.
  1. +8 −7 test/model.test.js
View
15 test/model.test.js
@@ -758,16 +758,17 @@ module.exports = {
});
});
},
-
+
+ // gh-662
'test nested structure created by merging': function() {
var db = start();
-
+
var MergedSchema = new Schema({
a: {
foo: String
}
});
-
+
MergedSchema.add({
a: {
b: {
@@ -775,10 +776,10 @@ module.exports = {
}
}
});
-
+
mongoose.model('Merged', MergedSchema);
var Merged = db.model('Merged', 'merged_' + Math.random());
-
+
var merged = new Merged({
a: {
foo: 'baz'
@@ -787,14 +788,14 @@ module.exports = {
}
}
});
-
+
merged.save(function(err) {
should.strictEqual(null, err);
Merged.findById(merged.id, function(err, found) {
+ db.close();
should.strictEqual(null, err);
found.a.foo.should.eql('baz');
found.a.b.bar.should.eql('qux');
- db.close();
});
});
},
Please sign in to comment.
Something went wrong with that request. Please try again.