aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts')
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts
index 78614c0f8..a479e0cbf 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts
@@ -17,9 +17,6 @@ class ActivatedRouteMock<T> {
}
}
-//
-
-
class MockAppStore {}
describe('instantiation templates modal service', () => {
@@ -123,7 +120,6 @@ describe('instantiation templates modal service', () => {
expect(tableRows[0].instantiationStatus).toEqual('FAILED');
expect(tableRows[0].region).toEqual('hvf6 (AAA1)');
expect(tableRows[0].tenant).toEqual('AIN Web Tool-15-D-SSPtestcustome');
- expect(tableRows[0].aicZone).toEqual('VSDKYUTP-BAN1');
expect(tableRows[0].jobId).toEqual('9f88fdb5-bb47-4bf3-8c5f-98f1ad0ec87c');
});
@@ -136,6 +132,14 @@ describe('instantiation templates modal service', () => {
expect(result.region).toEqual('regionId (OWNER)');
});
+ test('getRegion if null should return empty string', () => {
+ let result: InstantiationTemplatesRowModel = new InstantiationTemplatesRowModel({
+ owningEntityName: 'att-owner',
+ regionId: null
+ });
+ expect(result.region).toEqual('(OWNER)');
+ });
+
test('getCloudOwner should not return owningEntityName if not exist', () => {
let result: InstantiationTemplatesRowModel = new InstantiationTemplatesRowModel({owningEntityName: null, regionId: 'regionId'});
expect(result.region).toEqual('regionId');