@bluedot-innovation/models 7.2.1 → 7.3.1
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
|
@@ -405,11 +405,11 @@ describe('Project', () => {
|
|
|
405
405
|
})
|
|
406
406
|
})
|
|
407
407
|
|
|
408
|
-
|
|
408
|
+
describe('should not validate if webhooks contains a webhook of the same type and url but different structure', () => {
|
|
409
409
|
const webhookTypes = ['tempo', 'wave', 'trigger']
|
|
410
410
|
|
|
411
411
|
webhookTypes.map(webhookType => {
|
|
412
|
-
|
|
412
|
+
it(`should not validate if there are duplicate ${webhookType} webhooks`, (done) => {
|
|
413
413
|
project.webhooks.push({
|
|
414
414
|
"type": webhookType,
|
|
415
415
|
"url": "https://webhooklistener.bluedotinnovation.com",
|
|
@@ -422,7 +422,7 @@ describe('Project', () => {
|
|
|
422
422
|
let Project = new ProjectModel(project)
|
|
423
423
|
Project.validate((err, res) => {
|
|
424
424
|
assert.exists(err)
|
|
425
|
-
assert.match(err.message, /Duplicate webhooks found
|
|
425
|
+
assert.match(err.message, /Duplicate webhooks found with the same type and url as another. Only one is allowed/)
|
|
426
426
|
done()
|
|
427
427
|
})
|
|
428
428
|
})
|
package/package.json
CHANGED
|
@@ -5,7 +5,8 @@ let AccountBasicFeatureSchema = require('./AccountBasicFeature')
|
|
|
5
5
|
let AccountFeaturesSchema = new mongoose.Schema({
|
|
6
6
|
tempo: AccountTempoSchema,
|
|
7
7
|
realTimeDashboard: AccountBasicFeatureSchema,
|
|
8
|
-
screens: AccountBasicFeatureSchema
|
|
8
|
+
screens: AccountBasicFeatureSchema,
|
|
9
|
+
insights: AccountBasicFeatureSchema
|
|
9
10
|
}, {
|
|
10
11
|
_id: false
|
|
11
12
|
})
|