diff options
author | 2018-07-19 14:04:00 +0530 | |
---|---|---|
committer | 2018-07-19 20:59:53 +0000 | |
commit | 6e90b44532646e1abae58647d9bfbd95ddfd585a (patch) | |
tree | 346f1a1fc8593866f9334fabf5e69bd03072f004 /src | |
parent | 81cd65e098a82293158803d27a19bb0ba2c1fd18 (diff) |
Test case for vm-filtering.pipe
Wrote test case for vm-filtering pipe. the coverage for this file is now
100%.
Issue-ID: APPC-1064
Change-Id: I3ada33f251bbc180052eac8368b4d350a19c6860
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/app/pipes/vm-filtering.pipe.spec.ts | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/app/pipes/vm-filtering.pipe.spec.ts b/src/app/pipes/vm-filtering.pipe.spec.ts index ccd487e..f7f0937 100644 --- a/src/app/pipes/vm-filtering.pipe.spec.ts +++ b/src/app/pipes/vm-filtering.pipe.spec.ts @@ -2,6 +2,8 @@ ============LICENSE_START========================================== =================================================================== Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. =================================================================== Unless otherwise specified, all software contained herein is licensed @@ -19,11 +21,21 @@ limitations under the License. ECOMP is a trademark and service mark of AT&T Intellectual Property. ============LICENSE_END============================================ */ -import {VmFilteringPipe} from './vm-filtering.pipe'; +import { VmFilteringPipe } from './vm-filtering.pipe'; describe('VmFilteringPipe', () => { it('create an instance', () => { const pipe = new VmFilteringPipe(); expect(pipe).toBeTruthy(); }); + + it('should return empty list', () => { + const pipe = new VmFilteringPipe(); + expect(pipe.transform([{ 'template-id': '321' }], 'ConfigScaleOut', '234')).toEqual([]); + }); + + it('should return original list', () => { + const pipe = new VmFilteringPipe(); + expect(pipe.transform([{ 'template-id': '321' }], 'Config', '234')).toEqual([{ 'template-id': '321' }]); + }); }); |