Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add failing test for keys named 'type'

  • Loading branch information...
commit 1d15fbe25b7485d0d321ac95d55d9491e1e591b6 1 parent 2290833
@aheckmann aheckmann authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 test/model.test.js
View
16 test/model.test.js
@@ -1022,6 +1022,22 @@ module.exports = {
db.close();
},
+ 'test "type" is allowed as a key': function(){
+ var now = Date.now();
+
+ mongoose.model('TestTypeDefaults', new Schema({
+ type: { type: String, default: 'YES!' }
+ }));
+
+ var db = start()
+ , TestDefaults = db.model('TestTypeDefaults');
+
+ var post = new TestDefaults();
+ post.get('type').should.be.a('string');
+ post.get('type').should.eql('YES!');
+ db.close();
+ },
+
'test nested defaults application': function(){
var now = Date.now();
Please sign in to comment.
Something went wrong with that request. Please try again.