Skip to content
Browse files

add failing test for not adding a virtual id

  • Loading branch information...
1 parent 93d05f4 commit 1e5a5b411357530ba649a4e7458044346024d669 @aheckmann aheckmann committed May 10, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 test/schema.test.js
View
5 test/schema.test.js
@@ -768,6 +768,11 @@ module.exports = {
'test GH-298 - The default creation of a virtual `id` should be muted when someone defines their own `id` attribute': function () {
new Schema({ id: String });
+ },
+
+ 'allow disabling the auto .id virtual': function () {
+ var schema = new Schema({ name: String }, { novirtualid: true });
+ should.strictEqual(undefined, schema.virtuals.id);
}
};

0 comments on commit 1e5a5b4

Please sign in to comment.
Something went wrong with that request. Please try again.