Permalink
Browse files

add test for passing Subdocuments into Document#set

  • Loading branch information...
aheckmann committed May 19, 2011
1 parent c243d10 commit 147f3855a89f2653e3676ffbfeb4a3aa7b196bda
Showing with 11 additions and 0 deletions.
  1. +11 −0 test/types.document.test.js
@@ -67,6 +67,17 @@ module.exports = {
a.set({ test: 'paradiddle', work: 'good flam'});
a.test.should.eql('paradiddle');
a.work.should.eql('good flam');
+ },
+
+ 'Subdocuments can be passed to #set': function () {
+ var a = new Subdocument();
+ a.set({ test: 'paradiddle', work: 'good flam'});
+ a.test.should.eql('paradiddle');
+ a.work.should.eql('good flam');
+ var b = new Subdocument();
+ b.set(a);
+ b.test.should.eql('paradiddle');
+ b.work.should.eql('good flam');
}
};

0 comments on commit 147f385

Please sign in to comment.