diff options
author | 2019-12-24 21:15:40 +0200 | |
---|---|---|
committer | 2019-12-24 21:51:24 +0200 | |
commit | 31b3d53dbd80b8bb7dd2ac778cc53d2384a3abd9 (patch) | |
tree | deeebcb5e6af7fe020c4c7997a3e6d6905d923e1 /vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts | |
parent | 206d87766f6547934bf4298de326c63c8e31481a (diff) |
Convert template summary from json to string.
Issue-ID: VID-724
Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Change-Id: Icfe469b538c3dd5f82f95617ebbd6093b9e451dc
Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
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.ts | 12 |
1 files changed, 11 insertions, 1 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 2f044112b..6540a6551 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 @@ -54,6 +54,17 @@ describe('instantiation templates modal service', () => { expect(service).toBeDefined(); }); + test('convert map to json', () => { + let result:InstantiationTemplatesRowModel = new InstantiationTemplatesRowModel({ + "requestSummary": { + "vnf": 2, + "vfModule": 3, + "network": 1 + } + }); + expect(result.summary).toEqual( "{\"vnf\":2,\"vfModule\":3,\"network\":1}"); + }); + test('convertResponseToUI - should return table data', () => { const jobs = [{ @@ -92,7 +103,6 @@ describe('instantiation templates modal service', () => { "serviceModelName": "ComplexService", "serviceModelVersion": "1.0", "createdBulkDate": 1524995555000, - "isRetryEnabled": false }]; const tableRows: InstantiationTemplatesRowModel[] = service.convertResponseToUI(jobs); expect(tableRows).toHaveLength(1); |