Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add test for passing Subdocuments into Document#set

  • Loading branch information...
commit 147f3855a89f2653e3676ffbfeb4a3aa7b196bda 1 parent c243d10
@aheckmann aheckmann authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 test/types.document.test.js
View
11 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');
}
};
Please sign in to comment.
Something went wrong with that request. Please try again.