@bluedot-innovation/models 7.5.7 → 7.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -39,6 +39,28 @@ testCase('Account', () => {
|
|
|
39
39
|
done()
|
|
40
40
|
})
|
|
41
41
|
})
|
|
42
|
+
|
|
43
|
+
it('Should valid the account when CEMD whitelistedFields is null', (done) => {
|
|
44
|
+
account = JSON.parse(JSON.stringify(account))
|
|
45
|
+
account.features.cemdPersistence.whitelistedFields = null
|
|
46
|
+
const Account = new AccountModel(account)
|
|
47
|
+
Account.validate((err, res) => {
|
|
48
|
+
assert.notExists(res)
|
|
49
|
+
assert(err === null, 'err equals null')
|
|
50
|
+
done()
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
it('Should valid the account when CEMD whitelistedFields is undefined', (done) => {
|
|
55
|
+
account = JSON.parse(JSON.stringify(account))
|
|
56
|
+
delete account.features.cemdPersistence.whitelistedFields
|
|
57
|
+
const Account = new AccountModel(account)
|
|
58
|
+
Account.validate((err, res) => {
|
|
59
|
+
assert.notExists(res)
|
|
60
|
+
assert(err === null, 'err equals null')
|
|
61
|
+
done()
|
|
62
|
+
})
|
|
63
|
+
})
|
|
42
64
|
})
|
|
43
65
|
|
|
44
66
|
testCase('Invalid Account', () => {
|
package/package.json
CHANGED
|
@@ -2,12 +2,14 @@ let mongoose = require('mongoose')
|
|
|
2
2
|
let AccountTempoSchema = require('./AccountTempo')
|
|
3
3
|
let AccountBasicFeatureSchema = require('./AccountBasicFeature')
|
|
4
4
|
let AccountScreensSchema = require('./AccountScreens')
|
|
5
|
+
let AccountCemdPersistenceSchema = require('./AccountCemdPersistence')
|
|
5
6
|
|
|
6
7
|
let AccountFeaturesSchema = new mongoose.Schema({
|
|
7
8
|
tempo: AccountTempoSchema,
|
|
8
9
|
realTimeDashboard: AccountBasicFeatureSchema,
|
|
9
10
|
screens: AccountScreensSchema,
|
|
10
|
-
insights: AccountBasicFeatureSchema
|
|
11
|
+
insights: AccountBasicFeatureSchema,
|
|
12
|
+
cemdPersistence: AccountCemdPersistenceSchema
|
|
11
13
|
}, {
|
|
12
14
|
_id: false
|
|
13
15
|
})
|