mirror of https://gitee.com/bigwinds/arangodb
Make sure _PRINT is gone entirely.
This commit is contained in:
parent
c77e69307c
commit
3a957292fc
|
@ -59,7 +59,7 @@ function ModelSpec () {
|
|||
assertEqual(instance.get("a"), 1);
|
||||
},
|
||||
|
||||
testFromDB: function () {
|
||||
testFromDb: function () {
|
||||
var doc = require("org/arangodb").db._users.any();
|
||||
assertEqual(typeof doc._PRINT, 'function');
|
||||
instance = new FoxxModel(doc);
|
||||
|
@ -67,6 +67,17 @@ function ModelSpec () {
|
|||
assertFalse(instance.has('_PRINT'));
|
||||
},
|
||||
|
||||
testFromDbWithSchema: function () {
|
||||
var Model = FoxxModel.extend({
|
||||
user: joi.string()
|
||||
});
|
||||
var doc = require("org/arangodb").db._users.any();
|
||||
assertEqual(typeof doc._PRINT, 'function');
|
||||
instance = new Model(doc);
|
||||
assertEqual(instance.attributes._PRINT, undefined);
|
||||
assertFalse(instance.has('_PRINT'));
|
||||
},
|
||||
|
||||
testSettingMultipleAttributes: function () {
|
||||
instance = new FoxxModel({
|
||||
a: 1,
|
||||
|
|
Loading…
Reference in New Issue