soajs.multitenant 2.0.39 → 2.0.41

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/Gruntfile.js CHANGED
@@ -110,7 +110,7 @@ module.exports = function (grunt) {
110
110
  SOAJS_TEST: true,
111
111
  //SOAJS_SRVPORT: 4004,
112
112
  SOAJS_DEPLOY_MANUAL: true,
113
- SOAJS_REGISTRY_API: '127.0.0.1:5000',
113
+ SOAJS_REGISTRY_API: '127.0.0.1:15000',
114
114
  APP_DIR_FOR_CODE_COVERAGE: '../'
115
115
  },
116
116
  coverage: {
@@ -120,7 +120,7 @@ module.exports = function (grunt) {
120
120
  SOAJS_TEST: true,
121
121
  //SOAJS_SRVPORT: 4004,
122
122
  SOAJS_DEPLOY_MANUAL: true,
123
- SOAJS_REGISTRY_API: '127.0.0.1:5000',
123
+ SOAJS_REGISTRY_API: '127.0.0.1:15000',
124
124
  APP_DIR_FOR_CODE_COVERAGE: '../test/coverage/instrument/'
125
125
  }
126
126
  },
package/bl/tenant.js CHANGED
@@ -1150,6 +1150,9 @@ let bl = {
1150
1150
  if (inputmaskData.tag) {
1151
1151
  data.tag = inputmaskData.tag;
1152
1152
  }
1153
+ if (inputmaskData.category) {
1154
+ data.category = inputmaskData.category;
1155
+ }
1153
1156
  if (inputmaskData.name) {
1154
1157
  data.name = inputmaskData.name;
1155
1158
  }
package/config.js CHANGED
@@ -2910,6 +2910,12 @@ module.exports = {
2910
2910
  "validation": {
2911
2911
  "type": "object"
2912
2912
  }
2913
+ },
2914
+ "category": {
2915
+ "source": ['body.category'],
2916
+ "validation": {
2917
+ "type": "string"
2918
+ }
2913
2919
  }
2914
2920
  },
2915
2921
  "/tenant/profile": {
@@ -3070,6 +3076,12 @@ module.exports = {
3070
3076
  "validation": {
3071
3077
  "type": "object"
3072
3078
  }
3079
+ },
3080
+ "category": {
3081
+ "source": ['body.category'],
3082
+ "validation": {
3083
+ "type": "string"
3084
+ }
3073
3085
  }
3074
3086
  },
3075
3087
  "/admin/tenant/profile": {
@@ -141,6 +141,8 @@ Tenant.prototype.getTenant = function (data, cb) {
141
141
  __self.mongoCore.findOne(colName, condition, null, cb);
142
142
  } else {
143
143
  if (data.name) {
144
+ data.name = data.name.trim();
145
+ // data.name = data.name.toLowerCase();
144
146
  condition.$and.push({'name': data.name});
145
147
  }
146
148
  __self.mongoCore.findOne(colName, condition, null, cb);
@@ -393,6 +395,8 @@ Tenant.prototype.countTenants = function (data, cb) {
393
395
  return cb(error, null);
394
396
  }
395
397
 
398
+ data.name = data.name.trim();
399
+ // data.name = data.name.toLowerCase();
396
400
  let condition = {
397
401
  name: data.name
398
402
  };
@@ -416,6 +420,8 @@ Tenant.prototype.addTenant = function (data, cb) {
416
420
  let error = new Error("name and code are required.");
417
421
  return cb(error, null);
418
422
  }
423
+ data.name = data.name.trim();
424
+ // data.name = data.name.toLowerCase();
419
425
  __self.mongoCore.insertOne(colName, data, {}, (err, record) => {
420
426
  if (record && Array.isArray(record)) {
421
427
  record = record [0];
@@ -461,6 +467,8 @@ Tenant.prototype.updateTenant = function (data, cb) {
461
467
  }
462
468
 
463
469
  if (data.name) {
470
+ data.name = data.name.trim();
471
+ // data.name = data.name.toLowerCase();
464
472
  fields.$set.name = data.name;
465
473
  }
466
474
 
@@ -468,9 +476,14 @@ Tenant.prototype.updateTenant = function (data, cb) {
468
476
  fields.$set.tag = data.tag;
469
477
  }
470
478
 
479
+ if (data.category) {
480
+ fields.$set.category = data.category;
481
+ }
482
+
471
483
  if (data.profile) {
472
484
  fields.$set.profile = data.profile;
473
485
  }
486
+
474
487
  if (data.applications) {
475
488
  fields.$set.applications = data.applications;
476
489
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "soajs.multitenant",
3
3
  "description": "soajs multitenant service",
4
- "version": "2.0.39",
4
+ "version": "2.0.41",
5
5
  "author": "soajs team <team@soajs.org>",
6
6
  "repository": {
7
7
  "type": "git",
@@ -31,11 +31,11 @@
31
31
  "mocha": "6.2.2",
32
32
  "nock": "13.0.3",
33
33
  "request": "2.88.2",
34
- "soajs.controller": "4.0.48"
34
+ "soajs.controller": "4.0.52"
35
35
  },
36
36
  "dependencies": {
37
- "async": "3.2.2",
38
- "soajs": "4.0.33",
37
+ "async": "3.2.4",
38
+ "soajs": "4.0.34",
39
39
  "soajs.core.libs": "1.2.0",
40
40
  "uuid": "8.3.2"
41
41
  }
@@ -118,7 +118,7 @@ let lib = {
118
118
  refreshTokenLifetime: 1209600
119
119
  },
120
120
  ports: {
121
- controller: 4000,
121
+ controller: 14000,
122
122
  maintenanceInc: 1000,
123
123
  randomInc: 100
124
124
  },
@@ -20,7 +20,7 @@ let lib = {
20
20
  },
21
21
  },
22
22
  "code": "test2",
23
- "name": "Test 2 Tenant",
23
+ "name": "test 2 tenant",
24
24
  "description": "this is a description for test tenant",
25
25
  "applications": [
26
26
  {
@@ -2,7 +2,7 @@
2
2
  let lib = {
3
3
  type: "product",
4
4
  code: "DBTN",
5
- name: "Console Tenant",
5
+ name: "console tenant",
6
6
  description: "This is the tenant that holds the access rights and configuration for the console users with DSBRD_GUEST as Guest default package",
7
7
  oauth: {
8
8
  secret: "this is a secret",
@@ -13,7 +13,7 @@ let lib = {
13
13
  loginMode: "urac"
14
14
  },
15
15
  "code": "test",
16
- "name": "Test Tenant",
16
+ "name": "test tenant",
17
17
  "description": "this is a description for test tenant",
18
18
  "applications": [
19
19
  {
@@ -17,7 +17,7 @@ let accessToken = "44a5399dcce96325fadfab908e614bf00e6fe967";
17
17
 
18
18
  function requester(apiName, method, params, cb) {
19
19
  let options = {
20
- uri: 'http://127.0.0.1:4000/multitenant' + apiName,
20
+ uri: 'http://127.0.0.1:14000/multitenant' + apiName,
21
21
  headers: {
22
22
  key: extKey,
23
23
  access_token: accessToken
@@ -60,7 +60,7 @@ describe("Testing get tenant API", () => {
60
60
  assert.ifError(error);
61
61
  assert.ok(body);
62
62
  assert.ok(body.data);
63
- assert.deepEqual(body.data.name, 'Test 2 Tenant');
63
+ assert.deepEqual(body.data.name, 'test 2 tenant');
64
64
  assert.deepEqual(body.data.code, 'test2');
65
65
  assert.deepEqual(body.data.description, 'this is a description for test tenant');
66
66
  let check = validator.validate(body, getTenantsSchema);
@@ -80,7 +80,7 @@ describe("Testing get tenant API", () => {
80
80
  assert.ifError(error);
81
81
  assert.ok(body);
82
82
  assert.ok(body.data);
83
- assert.deepEqual(body.data.name, 'Test 2 Tenant');
83
+ assert.deepEqual(body.data.name, 'test 2 tenant');
84
84
  assert.deepEqual(body.data.code, 'test2');
85
85
  assert.deepEqual(body.data.description, 'this is a description for test tenant');
86
86
  let check = validator.validate(body, getTenantsSchema);
@@ -110,7 +110,7 @@ describe("Testing update tenant profile API", () => {
110
110
  assert.ifError(error);
111
111
  assert.ok(body);
112
112
  assert.ok(body.data);
113
- assert.deepEqual(body.data.name, 'Test 2 Tenant');
113
+ assert.deepEqual(body.data.name, 'test 2 tenant');
114
114
  assert.deepEqual(body.data.code, 'test2');
115
115
  assert.deepEqual(body.data.description, 'this is a description for test tenant');
116
116
  assert.deepEqual(body.data.profile, {
@@ -160,7 +160,7 @@ describe("Testing update tenant profile API", () => {
160
160
  assert.ifError(error);
161
161
  assert.ok(body);
162
162
  assert.ok(body.data);
163
- assert.deepEqual(body.data.name, 'Test 2 Tenant');
163
+ assert.deepEqual(body.data.name, 'test 2 tenant');
164
164
  assert.deepEqual(body.data.code, 'test2');
165
165
  assert.deepEqual(body.data.description, 'this is a description for test tenant');
166
166
  assert.deepEqual(body.data.profile, {
@@ -187,4 +187,4 @@ describe("Testing update tenant profile API", () => {
187
187
  done();
188
188
  });
189
189
  });
190
- });
190
+ });
@@ -288,14 +288,14 @@ describe("Unit test for: BL - tenant", () => {
288
288
  getTenant: (inputMask, cb) => {
289
289
  return cb(null, {
290
290
  "code": "test",
291
- "name": "Test Tenant",
291
+ "name": "test tenant",
292
292
  "description": "this is a description for test tenant",
293
293
  });
294
294
  }
295
295
  };
296
296
  BL.get(soajs, inputMask, (err, record) => {
297
297
  assert.ok(record);
298
- assert.deepEqual(record.name, "Test Tenant");
298
+ assert.deepEqual(record.name, "test tenant");
299
299
  done();
300
300
  });
301
301
  });
@@ -308,14 +308,14 @@ describe("Unit test for: BL - tenant", () => {
308
308
  return cb(null, {
309
309
  "id": "5c0e74ba9acc3c5a84a51259",
310
310
  "code": "test",
311
- "name": "Test Tenant",
311
+ "name": "test tenant",
312
312
  "description": "this is a description for test tenant",
313
313
  });
314
314
  }
315
315
  };
316
316
  BL.get(soajs, inputMask, (err, record) => {
317
317
  assert.ok(record);
318
- assert.deepEqual(record.name, "Test Tenant");
318
+ assert.deepEqual(record.name, "test tenant");
319
319
  done();
320
320
  });
321
321
  });
@@ -329,14 +329,14 @@ describe("Unit test for: BL - tenant", () => {
329
329
  getTenant: (inputMask, cb) => {
330
330
  return cb(null, {
331
331
  "_id": "testid",
332
- "name": "Test Tenant",
332
+ "name": "test tenant",
333
333
  "description": "this is a description for test tenant",
334
334
  });
335
335
  }
336
336
  };
337
337
  BL.get(soajs, inputMask, (err, record) => {
338
338
  assert.ok(record);
339
- assert.deepEqual(record.name, "Test Tenant");
339
+ assert.deepEqual(record.name, "test tenant");
340
340
  done();
341
341
  });
342
342
  });
@@ -374,7 +374,7 @@ describe("Unit test for: BL - tenant", () => {
374
374
  Tenant.prototype.getTenant = (data, cb) => {
375
375
  return cb(null, {
376
376
  "code": "test",
377
- "name": "Test Tenant",
377
+ "name": "test tenant",
378
378
  "description": "this is a description for test tenant",
379
379
  });
380
380
  };
@@ -388,7 +388,7 @@ describe("Unit test for: BL - tenant", () => {
388
388
 
389
389
  BL.get(soajsClient, inputMask, (err, record) => {
390
390
  assert.ok(record);
391
- assert.deepEqual(record.name, "Test Tenant");
391
+ assert.deepEqual(record.name, "test tenant");
392
392
  done();
393
393
  });
394
394
  });
@@ -418,7 +418,7 @@ describe("Unit test for: BL - tenant", () => {
418
418
  Tenant.prototype.getTenant = (inputMask, cb) => {
419
419
  return cb(null, {
420
420
  "_id": "testid",
421
- "name": "Test Tenant",
421
+ "name": "test tenant",
422
422
  "description": "this is a description for test tenant",
423
423
  });
424
424
  };
@@ -433,7 +433,7 @@ describe("Unit test for: BL - tenant", () => {
433
433
 
434
434
  BL.get(soajsClient, inputMask, (err, record) => {
435
435
  assert.ok(record);
436
- assert.deepEqual(record.name, "Test Tenant");
436
+ assert.deepEqual(record.name, "test tenant");
437
437
  done();
438
438
  });
439
439
  });
@@ -3151,7 +3151,7 @@ describe("Unit test for: BL - tenant", () => {
3151
3151
  return cb(null, {
3152
3152
  "id": "SomeID",
3153
3153
  "code": "test",
3154
- "name": "Test Tenant",
3154
+ "name": "test tenant",
3155
3155
  "description": "this is a description for test tenant",
3156
3156
  });
3157
3157
  },
@@ -3256,7 +3256,7 @@ describe("Unit test for: BL - tenant", () => {
3256
3256
  getTenant: (inputMask, cb) => {
3257
3257
  return cb(null, {
3258
3258
  "code": "test",
3259
- "name": "Test Tenant",
3259
+ "name": "test tenant",
3260
3260
  "description": "this is a description for test tenant",
3261
3261
  });
3262
3262
  },
@@ -3328,7 +3328,7 @@ describe("Unit test for: BL - tenant", () => {
3328
3328
  it("Success - Update tenant - data - id", (done) => {
3329
3329
  let inputMask = {
3330
3330
  "id": "SomeID",
3331
- "name": "Test Tenant",
3331
+ "name": "test tenant",
3332
3332
  "description": "this is an updated description for test tenant",
3333
3333
  "tag": "sometag",
3334
3334
  };
@@ -3338,7 +3338,7 @@ describe("Unit test for: BL - tenant", () => {
3338
3338
  return cb(null, {
3339
3339
  "_id": "SomeID",
3340
3340
  "code": "test",
3341
- "name": "Test Tenant",
3341
+ "name": "test tenant",
3342
3342
  "description": "this is a description for test tenant",
3343
3343
  });
3344
3344
  },
@@ -3357,7 +3357,7 @@ describe("Unit test for: BL - tenant", () => {
3357
3357
  it("Success - Update tenant - data - code", (done) => {
3358
3358
  let inputMask = {
3359
3359
  "code": "twr2",
3360
- "name": "Test Tenant",
3360
+ "name": "test tenant",
3361
3361
  "description": "this is an updated description for twr2 tenant",
3362
3362
  "tag": "sometag",
3363
3363
  };
@@ -3385,7 +3385,7 @@ describe("Unit test for: BL - tenant", () => {
3385
3385
 
3386
3386
  it("Success - Update tenant - no data - no code", (done) => {
3387
3387
  let inputMask = {
3388
- "name": "Test Tenant",
3388
+ "name": "test tenant",
3389
3389
  "description": "this is an updated description for twr2 tenant",
3390
3390
  "tag": "sometag",
3391
3391
  };
@@ -3443,7 +3443,7 @@ describe("Unit test for: BL - tenant", () => {
3443
3443
  getTenant: (inputMask, cb) => {
3444
3444
  return cb(null, {
3445
3445
  "code": "test",
3446
- "name": "Test Tenant",
3446
+ "name": "test tenant",
3447
3447
  "description": "this is a description for test tenant",
3448
3448
  });
3449
3449
  },
@@ -3525,7 +3525,7 @@ describe("Unit test for: BL - tenant", () => {
3525
3525
  return cb(null, {
3526
3526
  "_id": "tenantID",
3527
3527
  "code": "test",
3528
- "name": "Test Tenant",
3528
+ "name": "test tenant",
3529
3529
  "description": "this is a description for test tenant",
3530
3530
  "applications": [
3531
3531
  {
@@ -3579,7 +3579,7 @@ describe("Unit test for: BL - tenant", () => {
3579
3579
  return cb(null, {
3580
3580
  "_id": "tenantID",
3581
3581
  "code": "test",
3582
- "name": "Test Tenant",
3582
+ "name": "test tenant",
3583
3583
  "description": "this is a description for test tenant",
3584
3584
  "applications": [
3585
3585
  {
@@ -3632,7 +3632,7 @@ describe("Unit test for: BL - tenant", () => {
3632
3632
  return cb(null, {
3633
3633
  "_id": "tenantID",
3634
3634
  "code": "test",
3635
- "name": "Test Tenant",
3635
+ "name": "test tenant",
3636
3636
  "description": "this is a description for test tenant"
3637
3637
  });
3638
3638
  },
@@ -3660,7 +3660,7 @@ describe("Unit test for: BL - tenant", () => {
3660
3660
  return cb(null, {
3661
3661
  "_id": "tenantID",
3662
3662
  "code": "test",
3663
- "name": "Test Tenant",
3663
+ "name": "test tenant",
3664
3664
  "description": "this is a description for test tenant",
3665
3665
  "applications": [
3666
3666
  {
@@ -3741,7 +3741,7 @@ describe("Unit test for: BL - tenant", () => {
3741
3741
  return cb(null, {
3742
3742
  "_id": "tenantID",
3743
3743
  "code": "test",
3744
- "name": "Test Tenant",
3744
+ "name": "test tenant",
3745
3745
  "description": "this is a description for test tenant",
3746
3746
  "applications": [
3747
3747
  {
@@ -3881,7 +3881,7 @@ describe("Unit test for: BL - tenant", () => {
3881
3881
  return cb(null, {
3882
3882
  "_id": "tenantID",
3883
3883
  "code": "test",
3884
- "name": "Test Tenant",
3884
+ "name": "test tenant",
3885
3885
  "description": "this is a description for test tenant",
3886
3886
  "applications": [
3887
3887
  {
@@ -3949,7 +3949,7 @@ describe("Unit test for: BL - tenant", () => {
3949
3949
  return cb(null, {
3950
3950
  "_id": "tenantID",
3951
3951
  "code": "test",
3952
- "name": "Test Tenant",
3952
+ "name": "test tenant",
3953
3953
  "description": "this is a description for test tenant",
3954
3954
  "applications": [
3955
3955
  {
@@ -4017,7 +4017,7 @@ describe("Unit test for: BL - tenant", () => {
4017
4017
  return cb(null, {
4018
4018
  "_id": "tenantID",
4019
4019
  "code": "test",
4020
- "name": "Test Tenant",
4020
+ "name": "test tenant",
4021
4021
  "description": "this is a description for test tenant"
4022
4022
  });
4023
4023
  },
@@ -4060,7 +4060,7 @@ describe("Unit test for: BL - tenant", () => {
4060
4060
  return cb(null, {
4061
4061
  "_id": "tenantID",
4062
4062
  "code": "test",
4063
- "name": "Test Tenant",
4063
+ "name": "test tenant",
4064
4064
  "description": "this is a description for test tenant",
4065
4065
  "applications": [
4066
4066
  {
@@ -4156,7 +4156,7 @@ describe("Unit test for: BL - tenant", () => {
4156
4156
  return cb(null, {
4157
4157
  "_id": "tenantID",
4158
4158
  "code": "test",
4159
- "name": "Test Tenant",
4159
+ "name": "test tenant",
4160
4160
  "description": "this is a description for test tenant",
4161
4161
  "applications": [
4162
4162
  {
@@ -4207,7 +4207,7 @@ describe("Unit test for: BL - tenant", () => {
4207
4207
  return cb(null, {
4208
4208
  "_id": "tenantID",
4209
4209
  "code": "test",
4210
- "name": "Test Tenant",
4210
+ "name": "test tenant",
4211
4211
  "description": "this is a description for test tenant",
4212
4212
  "applications": [
4213
4213
  {
@@ -4311,7 +4311,7 @@ describe("Unit test for: BL - tenant", () => {
4311
4311
  return cb(null, {
4312
4312
  "_id": "tenantID",
4313
4313
  "code": "test",
4314
- "name": "Test Tenant",
4314
+ "name": "test tenant",
4315
4315
  "description": "this is a description for test tenant",
4316
4316
  "applications": [
4317
4317
  {
@@ -4368,7 +4368,7 @@ describe("Unit test for: BL - tenant", () => {
4368
4368
  getTenant: (inputMask, cb) => {
4369
4369
  return cb(null, {
4370
4370
  "_id": "tenantID",
4371
- "name": "Test Tenant",
4371
+ "name": "test tenant",
4372
4372
  "description": "this is a description for test tenant",
4373
4373
  "applications": [
4374
4374
  {
@@ -4425,7 +4425,7 @@ describe("Unit test for: BL - tenant", () => {
4425
4425
  getTenant: (inputMask, cb) => {
4426
4426
  return cb(null, {
4427
4427
  "_id": "tenantID",
4428
- "name": "Test Tenant",
4428
+ "name": "test tenant",
4429
4429
  "description": "this is a description for test tenant"
4430
4430
  });
4431
4431
  },
@@ -4457,7 +4457,7 @@ describe("Unit test for: BL - tenant", () => {
4457
4457
  getTenant: (inputMask, cb) => {
4458
4458
  return cb(null, {
4459
4459
  "_id": "tenantID",
4460
- "name": "Test Tenant",
4460
+ "name": "test tenant",
4461
4461
  "description": "this is a description for test tenant",
4462
4462
  "applications": [
4463
4463
  {
@@ -4513,7 +4513,7 @@ describe("Unit test for: BL - tenant", () => {
4513
4513
  getTenant: (inputMask, cb) => {
4514
4514
  return cb(null, {
4515
4515
  "_id": "tenantID",
4516
- "name": "Test Tenant",
4516
+ "name": "test tenant",
4517
4517
  "description": "this is a description for test tenant",
4518
4518
  "applications": [
4519
4519
  {
@@ -4560,7 +4560,7 @@ describe("Unit test for: BL - tenant", () => {
4560
4560
  getTenant: (inputMask, cb) => {
4561
4561
  return cb(null, {
4562
4562
  "_id": "tenantID",
4563
- "name": "Test Tenant",
4563
+ "name": "test tenant",
4564
4564
  "description": "this is a description for test tenant",
4565
4565
  "applications": [
4566
4566
  {
@@ -4640,7 +4640,7 @@ describe("Unit test for: BL - tenant", () => {
4640
4640
  return cb(null, {
4641
4641
  "_id": "tenantID",
4642
4642
  "code": "test",
4643
- "name": "Test Tenant",
4643
+ "name": "test tenant",
4644
4644
  "description": "this is a description for test tenant",
4645
4645
  "applications": [
4646
4646
  {
@@ -4691,7 +4691,7 @@ describe("Unit test for: BL - tenant", () => {
4691
4691
  return cb(null, {
4692
4692
  "_id": "tenantID",
4693
4693
  "code": "test",
4694
- "name": "Test Tenant",
4694
+ "name": "test tenant",
4695
4695
  "description": "this is a description for test tenant",
4696
4696
  "applications": [
4697
4697
  {
@@ -4810,7 +4810,7 @@ describe("Unit test for: BL - tenant", () => {
4810
4810
  return cb(null, {
4811
4811
  "_id": "tenantID",
4812
4812
  "code": "test",
4813
- "name": "Test Tenant",
4813
+ "name": "test tenant",
4814
4814
  "description": "this is a description for test tenant",
4815
4815
  "applications": [
4816
4816
  {
@@ -4864,7 +4864,7 @@ describe("Unit test for: BL - tenant", () => {
4864
4864
  return cb(null, {
4865
4865
  "_id": "tenantID",
4866
4866
  "code": "test",
4867
- "name": "Test Tenant",
4867
+ "name": "test tenant",
4868
4868
  "description": "this is a description for test tenant",
4869
4869
  "applications": [
4870
4870
  {
@@ -4966,7 +4966,7 @@ describe("Unit test for: BL - tenant", () => {
4966
4966
  return cb(null, {
4967
4967
  "_id": "tenantID",
4968
4968
  "code": "test",
4969
- "name": "Test Tenant",
4969
+ "name": "test tenant",
4970
4970
  "description": "this is a description for test tenant",
4971
4971
  "applications": [
4972
4972
  {
@@ -5017,7 +5017,7 @@ describe("Unit test for: BL - tenant", () => {
5017
5017
  return cb(null, {
5018
5018
  "_id": "tenantID",
5019
5019
  "code": "test",
5020
- "name": "Test Tenant",
5020
+ "name": "test tenant",
5021
5021
  "description": "this is a description for test tenant",
5022
5022
  "applications": [
5023
5023
  {
@@ -5102,7 +5102,7 @@ describe("Unit test for: BL - tenant", () => {
5102
5102
  return cb(null, {
5103
5103
  "_id": "tenantID",
5104
5104
  "code": "test",
5105
- "name": "Test Tenant",
5105
+ "name": "test tenant",
5106
5106
  "description": "this is a description for test tenant",
5107
5107
  "applications": [
5108
5108
  {
@@ -5166,7 +5166,7 @@ describe("Unit test for: BL - tenant", () => {
5166
5166
  return cb(null, {
5167
5167
  "_id": "tenantID",
5168
5168
  "code": "test",
5169
- "name": "Test Tenant",
5169
+ "name": "test tenant",
5170
5170
  "description": "this is a description for test tenant",
5171
5171
  "applications": [
5172
5172
  {
@@ -5230,7 +5230,7 @@ describe("Unit test for: BL - tenant", () => {
5230
5230
  return cb(null, {
5231
5231
  "_id": "tenantID",
5232
5232
  "code": "test",
5233
- "name": "Test Tenant",
5233
+ "name": "test tenant",
5234
5234
  "description": "this is a description for test tenant",
5235
5235
  "applications": [
5236
5236
  {
@@ -5317,7 +5317,7 @@ describe("Unit test for: BL - tenant", () => {
5317
5317
  return cb(null, {
5318
5318
  "_id": "tenantID",
5319
5319
  "code": "test",
5320
- "name": "Test Tenant",
5320
+ "name": "test tenant",
5321
5321
  "description": "this is a description for test tenant",
5322
5322
  "applications": [
5323
5323
  {
@@ -5368,7 +5368,7 @@ describe("Unit test for: BL - tenant", () => {
5368
5368
  return cb(null, {
5369
5369
  "_id": "tenantID",
5370
5370
  "code": "test",
5371
- "name": "Test Tenant",
5371
+ "name": "test tenant",
5372
5372
  "description": "this is a description for test tenant",
5373
5373
  "applications": [
5374
5374
  {
@@ -5445,7 +5445,7 @@ describe("Unit test for: BL - tenant", () => {
5445
5445
  return cb(null, {
5446
5446
  "id": "SomeID",
5447
5447
  "code": "test",
5448
- "name": "Test Tenant",
5448
+ "name": "test tenant",
5449
5449
  "description": "this is a description for test tenant",
5450
5450
  });
5451
5451
  },
@@ -5496,7 +5496,7 @@ describe("Unit test for: BL - tenant", () => {
5496
5496
  getTenant: (inputMask, cb) => {
5497
5497
  return cb(null, {
5498
5498
  "code": "test",
5499
- "name": "Test Tenant",
5499
+ "name": "test tenant",
5500
5500
  "description": "this is a description for test tenant",
5501
5501
  });
5502
5502
  },
@@ -5650,7 +5650,7 @@ describe("Unit test for: BL - tenant", () => {
5650
5650
  },
5651
5651
  },
5652
5652
  "code": "test",
5653
- "name": "Test Tenant",
5653
+ "name": "test tenant",
5654
5654
  "description": "this is a description for test tenant",
5655
5655
  "applications": [
5656
5656
  {
@@ -5720,7 +5720,7 @@ describe("Unit test for: BL - tenant", () => {
5720
5720
  },
5721
5721
  },
5722
5722
  "code": "test",
5723
- "name": "Test Tenant",
5723
+ "name": "test tenant",
5724
5724
  "description": "this is a description for test tenant",
5725
5725
  "applications": [
5726
5726
  {
@@ -5835,7 +5835,7 @@ describe("Unit test for: BL - tenant", () => {
5835
5835
  },
5836
5836
  },
5837
5837
  "code": "test",
5838
- "name": "Test Tenant",
5838
+ "name": "test tenant",
5839
5839
  "description": "this is a description for test tenant"
5840
5840
  });
5841
5841
  }
@@ -5875,7 +5875,7 @@ describe("Unit test for: BL - tenant", () => {
5875
5875
  },
5876
5876
  },
5877
5877
  "code": "test",
5878
- "name": "Test Tenant",
5878
+ "name": "test tenant",
5879
5879
  "description": "this is a description for test tenant",
5880
5880
  "applications": [
5881
5881
  {
@@ -5951,7 +5951,7 @@ describe("Unit test for: BL - tenant", () => {
5951
5951
  },
5952
5952
  },
5953
5953
  "code": "test",
5954
- "name": "Test Tenant",
5954
+ "name": "test tenant",
5955
5955
  "description": "this is a description for test tenant",
5956
5956
  "applications": [
5957
5957
  {
@@ -6019,7 +6019,7 @@ describe("Unit test for: BL - tenant", () => {
6019
6019
  },
6020
6020
  },
6021
6021
  "code": "test",
6022
- "name": "Test Tenant",
6022
+ "name": "test tenant",
6023
6023
  "description": "this is a description for test tenant",
6024
6024
  "applications": [
6025
6025
  {
@@ -6087,7 +6087,7 @@ describe("Unit test for: BL - tenant", () => {
6087
6087
  },
6088
6088
  },
6089
6089
  "code": "test",
6090
- "name": "Test Tenant",
6090
+ "name": "test tenant",
6091
6091
  "description": "this is a description for test tenant"
6092
6092
  });
6093
6093
  }
@@ -6179,7 +6179,7 @@ describe("Unit test for: BL - tenant", () => {
6179
6179
  },
6180
6180
  },
6181
6181
  "code": "test",
6182
- "name": "Test Tenant",
6182
+ "name": "test tenant",
6183
6183
  "description": "this is a description for test tenant",
6184
6184
  "applications": [
6185
6185
  {
@@ -6247,7 +6247,7 @@ describe("Unit test for: BL - tenant", () => {
6247
6247
  },
6248
6248
  },
6249
6249
  "code": "test",
6250
- "name": "Test Tenant",
6250
+ "name": "test tenant",
6251
6251
  "description": "this is a description for test tenant",
6252
6252
  "applications": [
6253
6253
  {
@@ -6315,7 +6315,7 @@ describe("Unit test for: BL - tenant", () => {
6315
6315
  },
6316
6316
  },
6317
6317
  "code": "test",
6318
- "name": "Test Tenant",
6318
+ "name": "test tenant",
6319
6319
  "description": "this is a description for test tenant"
6320
6320
  });
6321
6321
  }
@@ -6408,7 +6408,7 @@ describe("Unit test for: BL - tenant", () => {
6408
6408
  },
6409
6409
  },
6410
6410
  "code": "test",
6411
- "name": "Test Tenant",
6411
+ "name": "test tenant",
6412
6412
  "description": "this is a description for test tenant",
6413
6413
  "applications": [
6414
6414
  {
@@ -6484,7 +6484,7 @@ describe("Unit test for: BL - tenant", () => {
6484
6484
  },
6485
6485
  },
6486
6486
  "code": "test",
6487
- "name": "Test Tenant",
6487
+ "name": "test tenant",
6488
6488
  "description": "this is a description for test tenant",
6489
6489
  "applications": [
6490
6490
  {
@@ -6561,7 +6561,7 @@ describe("Unit test for: BL - tenant", () => {
6561
6561
  },
6562
6562
  },
6563
6563
  "code": "test",
6564
- "name": "Test Tenant",
6564
+ "name": "test tenant",
6565
6565
  "description": "this is a description for test tenant"
6566
6566
  });
6567
6567
  }
@@ -6653,7 +6653,7 @@ describe("Unit test for: BL - tenant", () => {
6653
6653
  },
6654
6654
  },
6655
6655
  "code": "test",
6656
- "name": "Test Tenant",
6656
+ "name": "test tenant",
6657
6657
  "description": "this is a description for test tenant",
6658
6658
  "applications": [
6659
6659
  {
@@ -6724,7 +6724,7 @@ describe("Unit test for: BL - tenant", () => {
6724
6724
  },
6725
6725
  },
6726
6726
  "code": "test",
6727
- "name": "Test Tenant",
6727
+ "name": "test tenant",
6728
6728
  "description": "this is a description for test tenant",
6729
6729
  "applications": [
6730
6730
  {
@@ -6792,7 +6792,7 @@ describe("Unit test for: BL - tenant", () => {
6792
6792
  },
6793
6793
  },
6794
6794
  "code": "test",
6795
- "name": "Test Tenant",
6795
+ "name": "test tenant",
6796
6796
  "description": "this is a description for test tenant"
6797
6797
  });
6798
6798
  }
@@ -6833,7 +6833,7 @@ describe("Unit test for: BL - tenant", () => {
6833
6833
  },
6834
6834
  },
6835
6835
  "code": "test",
6836
- "name": "Test Tenant",
6836
+ "name": "test tenant",
6837
6837
  "description": "this is a description for test tenant",
6838
6838
  "applications": [
6839
6839
  {
@@ -6883,7 +6883,7 @@ describe("Unit test for: BL - tenant", () => {
6883
6883
  },
6884
6884
  },
6885
6885
  "code": "test",
6886
- "name": "Test Tenant",
6886
+ "name": "test tenant",
6887
6887
  "description": "this is a description for test tenant",
6888
6888
  "applications": [
6889
6889
  {
@@ -6996,7 +6996,7 @@ describe("Unit test for: BL - tenant", () => {
6996
6996
  },
6997
6997
  },
6998
6998
  "code": "test",
6999
- "name": "Test Tenant",
6999
+ "name": "test tenant",
7000
7000
  "description": "this is a description for test tenant",
7001
7001
  "applications": [
7002
7002
  {
@@ -7095,7 +7095,7 @@ describe("Unit test for: BL - tenant", () => {
7095
7095
  },
7096
7096
  },
7097
7097
  "code": "test",
7098
- "name": "Test Tenant",
7098
+ "name": "test tenant",
7099
7099
  "description": "this is a description for test tenant",
7100
7100
  "applications": [
7101
7101
  {
@@ -7293,7 +7293,7 @@ describe("Unit test for: BL - tenant", () => {
7293
7293
  },
7294
7294
  },
7295
7295
  "code": "test",
7296
- "name": "Test Tenant",
7296
+ "name": "test tenant",
7297
7297
  "description": "this is a description for test tenant",
7298
7298
  "applications": [
7299
7299
  {
@@ -7392,7 +7392,7 @@ describe("Unit test for: BL - tenant", () => {
7392
7392
  },
7393
7393
  },
7394
7394
  "code": "test",
7395
- "name": "Test Tenant",
7395
+ "name": "test tenant",
7396
7396
  "description": "this is a description for test tenant",
7397
7397
  "applications": [
7398
7398
  {
@@ -7591,7 +7591,7 @@ describe("Unit test for: BL - tenant", () => {
7591
7591
  },
7592
7592
  },
7593
7593
  "code": "test",
7594
- "name": "Test Tenant",
7594
+ "name": "test tenant",
7595
7595
  "description": "this is a description for test tenant",
7596
7596
  "applications": [
7597
7597
  {
@@ -7666,7 +7666,7 @@ describe("Unit test for: BL - tenant", () => {
7666
7666
  },
7667
7667
  },
7668
7668
  "code": "test",
7669
- "name": "Test Tenant",
7669
+ "name": "test tenant",
7670
7670
  "description": "this is a description for test tenant",
7671
7671
  "applications": [
7672
7672
  {
@@ -7762,7 +7762,7 @@ describe("Unit test for: BL - tenant", () => {
7762
7762
  },
7763
7763
  },
7764
7764
  "code": "test",
7765
- "name": "Test Tenant",
7765
+ "name": "test tenant",
7766
7766
  "description": "this is a description for test tenant",
7767
7767
  "applications": [
7768
7768
  {
@@ -7955,7 +7955,7 @@ describe("Unit test for: BL - tenant", () => {
7955
7955
  },
7956
7956
  },
7957
7957
  "code": "test",
7958
- "name": "Test Tenant",
7958
+ "name": "test tenant",
7959
7959
  "description": "this is a description for test tenant"
7960
7960
  });
7961
7961
  }
@@ -7996,7 +7996,7 @@ describe("Unit test for: BL - tenant", () => {
7996
7996
  },
7997
7997
  },
7998
7998
  "code": "test",
7999
- "name": "Test Tenant",
7999
+ "name": "test tenant",
8000
8000
  "description": "this is a description for test tenant",
8001
8001
  "applications": [
8002
8002
  {
@@ -8066,7 +8066,7 @@ describe("Unit test for: BL - tenant", () => {
8066
8066
  },
8067
8067
  },
8068
8068
  "code": "test",
8069
- "name": "Test Tenant",
8069
+ "name": "test tenant",
8070
8070
  "description": "this is a description for test tenant",
8071
8071
  "applications": [
8072
8072
  {
@@ -8169,7 +8169,7 @@ describe("Unit test for: BL - tenant", () => {
8169
8169
  },
8170
8170
  },
8171
8171
  "code": "test",
8172
- "name": "Test Tenant",
8172
+ "name": "test tenant",
8173
8173
  "description": "this is a description for test tenant",
8174
8174
  "applications": [
8175
8175
  {
@@ -8259,7 +8259,7 @@ describe("Unit test for: BL - tenant", () => {
8259
8259
  },
8260
8260
  },
8261
8261
  "code": "test",
8262
- "name": "Test Tenant",
8262
+ "name": "test tenant",
8263
8263
  "description": "this is a description for test tenant",
8264
8264
  "applications": [
8265
8265
  {
@@ -8338,7 +8338,7 @@ describe("Unit test for: BL - tenant", () => {
8338
8338
  },
8339
8339
  },
8340
8340
  "code": "test",
8341
- "name": "Test Tenant",
8341
+ "name": "test tenant",
8342
8342
  "description": "this is a description for test tenant"
8343
8343
  });
8344
8344
  },
@@ -8389,7 +8389,7 @@ describe("Unit test for: BL - tenant", () => {
8389
8389
  },
8390
8390
  },
8391
8391
  "code": "test",
8392
- "name": "Test Tenant",
8392
+ "name": "test tenant",
8393
8393
  "description": "this is a description for test tenant",
8394
8394
  "applications": [
8395
8395
  {
@@ -8503,7 +8503,7 @@ describe("Unit test for: BL - tenant", () => {
8503
8503
  },
8504
8504
  },
8505
8505
  "code": "test",
8506
- "name": "Test Tenant",
8506
+ "name": "test tenant",
8507
8507
  "description": "this is a description for test tenant",
8508
8508
  "applications": [
8509
8509
  {
@@ -8606,7 +8606,7 @@ describe("Unit test for: BL - tenant", () => {
8606
8606
  },
8607
8607
  },
8608
8608
  "code": "test",
8609
- "name": "Test Tenant",
8609
+ "name": "test tenant",
8610
8610
  "description": "this is a description for test tenant",
8611
8611
  "applications": [
8612
8612
  {
@@ -8712,7 +8712,7 @@ describe("Unit test for: BL - tenant", () => {
8712
8712
  },
8713
8713
  },
8714
8714
  "code": "test",
8715
- "name": "Test Tenant",
8715
+ "name": "test tenant",
8716
8716
  "description": "this is a description for test tenant",
8717
8717
  "applications": [
8718
8718
  {
@@ -8831,7 +8831,7 @@ describe("Unit test for: BL - tenant", () => {
8831
8831
  },
8832
8832
  },
8833
8833
  "code": "test",
8834
- "name": "Test Tenant",
8834
+ "name": "test tenant",
8835
8835
  "description": "this is a description for test tenant",
8836
8836
  "applications": [
8837
8837
  {
@@ -8918,7 +8918,7 @@ describe("Unit test for: BL - tenant", () => {
8918
8918
  },
8919
8919
  },
8920
8920
  "code": "test",
8921
- "name": "Test Tenant",
8921
+ "name": "test tenant",
8922
8922
  "description": "this is a description for test tenant",
8923
8923
  "applications": [
8924
8924
  {
@@ -9082,7 +9082,7 @@ describe("Unit test for: BL - tenant", () => {
9082
9082
  },
9083
9083
  },
9084
9084
  "code": "test",
9085
- "name": "Test Tenant",
9085
+ "name": "test tenant",
9086
9086
  "description": "this is a description for test tenant",
9087
9087
  "applications": [
9088
9088
  {
@@ -9179,7 +9179,7 @@ describe("Unit test for: BL - tenant", () => {
9179
9179
  },
9180
9180
  },
9181
9181
  "code": "test",
9182
- "name": "Test Tenant",
9182
+ "name": "test tenant",
9183
9183
  "description": "this is a description for test tenant",
9184
9184
  "applications": [
9185
9185
  {
@@ -9257,7 +9257,7 @@ describe("Unit test for: BL - tenant", () => {
9257
9257
  },
9258
9258
  },
9259
9259
  "code": "test",
9260
- "name": "Test Tenant",
9260
+ "name": "test tenant",
9261
9261
  "description": "this is a description for test tenant"
9262
9262
  });
9263
9263
  },
@@ -9326,7 +9326,7 @@ describe("Unit test for: BL - tenant", () => {
9326
9326
  },
9327
9327
  },
9328
9328
  "code": "test",
9329
- "name": "Test Tenant",
9329
+ "name": "test tenant",
9330
9330
  "description": "this is a description for test tenant",
9331
9331
  "applications": [
9332
9332
  {
@@ -9410,7 +9410,7 @@ describe("Unit test for: BL - tenant", () => {
9410
9410
  },
9411
9411
  },
9412
9412
  "code": "test",
9413
- "name": "Test Tenant",
9413
+ "name": "test tenant",
9414
9414
  "description": "this is a description for test tenant",
9415
9415
  "applications": [
9416
9416
  {
@@ -9532,7 +9532,7 @@ describe("Unit test for: BL - tenant", () => {
9532
9532
  },
9533
9533
  },
9534
9534
  "code": "test",
9535
- "name": "Test Tenant",
9535
+ "name": "test tenant",
9536
9536
  "description": "this is a description for test tenant",
9537
9537
  "applications": [
9538
9538
  {
@@ -9641,7 +9641,7 @@ describe("Unit test for: BL - tenant", () => {
9641
9641
  },
9642
9642
  },
9643
9643
  "code": "test",
9644
- "name": "Test Tenant",
9644
+ "name": "test tenant",
9645
9645
  "description": "this is a description for test tenant",
9646
9646
  "applications": [
9647
9647
  {
@@ -9755,7 +9755,7 @@ describe("Unit test for: BL - tenant", () => {
9755
9755
  },
9756
9756
  },
9757
9757
  "code": "test",
9758
- "name": "Test Tenant",
9758
+ "name": "test tenant",
9759
9759
  "description": "this is a description for test tenant",
9760
9760
  "applications": [
9761
9761
  {
@@ -9904,7 +9904,7 @@ describe("Unit test for: BL - tenant", () => {
9904
9904
  },
9905
9905
  },
9906
9906
  "code": "test",
9907
- "name": "Test Tenant",
9907
+ "name": "test tenant",
9908
9908
  "description": "this is a description for test tenant",
9909
9909
  "applications": [
9910
9910
  {
@@ -10070,7 +10070,7 @@ describe("Unit test for: BL - tenant", () => {
10070
10070
  },
10071
10071
  },
10072
10072
  "code": "test",
10073
- "name": "Test Tenant",
10073
+ "name": "test tenant",
10074
10074
  "description": "this is a description for test tenant",
10075
10075
  "applications": [
10076
10076
  {
@@ -10157,7 +10157,7 @@ describe("Unit test for: BL - tenant", () => {
10157
10157
  },
10158
10158
  },
10159
10159
  "code": "test",
10160
- "name": "Test Tenant",
10160
+ "name": "test tenant",
10161
10161
  "description": "this is a description for test tenant",
10162
10162
  "applications": [
10163
10163
  {
@@ -10236,7 +10236,7 @@ describe("Unit test for: BL - tenant", () => {
10236
10236
  },
10237
10237
  },
10238
10238
  "code": "test",
10239
- "name": "Test Tenant",
10239
+ "name": "test tenant",
10240
10240
  "description": "this is a description for test tenant"
10241
10241
  });
10242
10242
  },
@@ -10315,7 +10315,7 @@ describe("Unit test for: BL - tenant", () => {
10315
10315
  },
10316
10316
  },
10317
10317
  "code": "test",
10318
- "name": "Test Tenant",
10318
+ "name": "test tenant",
10319
10319
  "description": "this is a description for test tenant",
10320
10320
  "applications": [
10321
10321
  {
@@ -10394,7 +10394,7 @@ describe("Unit test for: BL - tenant", () => {
10394
10394
  },
10395
10395
  },
10396
10396
  "code": "test",
10397
- "name": "Test Tenant",
10397
+ "name": "test tenant",
10398
10398
  "description": "this is a description for test tenant",
10399
10399
  "applications": [
10400
10400
  {
@@ -10499,7 +10499,7 @@ describe("Unit test for: BL - tenant", () => {
10499
10499
  },
10500
10500
  },
10501
10501
  "code": "test",
10502
- "name": "Test Tenant",
10502
+ "name": "test tenant",
10503
10503
  "description": "this is a description for test tenant",
10504
10504
  "applications": [
10505
10505
  {
@@ -10608,7 +10608,7 @@ describe("Unit test for: BL - tenant", () => {
10608
10608
  },
10609
10609
  },
10610
10610
  "code": "test",
10611
- "name": "Test Tenant",
10611
+ "name": "test tenant",
10612
10612
  "description": "this is a description for test tenant",
10613
10613
  "applications": [
10614
10614
  {
@@ -10701,7 +10701,7 @@ describe("Unit test for: BL - tenant", () => {
10701
10701
  },
10702
10702
  },
10703
10703
  "code": "test",
10704
- "name": "Test Tenant",
10704
+ "name": "test tenant",
10705
10705
  "description": "this is a description for test tenant",
10706
10706
  "applications": [
10707
10707
  {
@@ -10788,4 +10788,4 @@ describe("Unit test for: BL - tenant", () => {
10788
10788
 
10789
10789
  });
10790
10790
 
10791
- });
10791
+ });
@@ -137,7 +137,7 @@ describe("Unit test for: Model - tenant", () => {
137
137
  assert.ifError(err);
138
138
  assert.ok(record);
139
139
  tenantTest = record;
140
- assert.deepEqual(record.name, 'Test Tenant');
140
+ assert.deepEqual(record.name, 'test tenant');
141
141
  assert.deepEqual(record.description, 'this is a description for test tenant');
142
142
  done();
143
143
  });
@@ -154,7 +154,7 @@ describe("Unit test for: Model - tenant", () => {
154
154
  model.getTenant({id: selectedTenant._id}, (err, record) => {
155
155
  assert.ifError(err);
156
156
  assert.ok(record);
157
- assert.deepEqual(record.name, 'Test Tenant');
157
+ assert.deepEqual(record.name, 'test tenant');
158
158
  assert.deepEqual(record.description, 'this is a description for test tenant');
159
159
  assert.deepEqual(typeof record, "object");
160
160
  done();
@@ -214,7 +214,7 @@ describe("Unit test for: Model - tenant", () => {
214
214
  });
215
215
 
216
216
  it("Success - countTenants - data", (done) => {
217
- model.countTenants({name: 'Console Tenant', code: 'DBTN'}, (err, count) => {
217
+ model.countTenants({name: 'console tenant', code: 'DBTN'}, (err, count) => {
218
218
  assert.ok(count);
219
219
  assert.deepEqual(count, 1);
220
220
  done();