From 007abaaf261386af4263c75dbd23b42699003dcf Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Thu, 2 Aug 2018 14:43:20 +0530 Subject: userloginForm- Fixed test case Test case in userlogin form was expecting wrong values because of which the test case failed. Changed the test case expecting values to proper values. Issue-ID: APPC-1064 Change-Id: I9b1aedc70a806b235c0b56d936370e8a1a62d2dd Signed-off-by: Arundathi Patil --- src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts b/src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts index 16863a4..ea97439 100644 --- a/src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts +++ b/src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts @@ -95,11 +95,12 @@ describe('userloginFormComponent', () => { component.getData(); const url = spy.calls.first().args[0]; - - expect(url.length).toBe(2); - expect(url[0]).toEqual('vnfs'); - - expect(url[1]).toEqual('list'); + // return url is set to '/home' in mockActiveRoute. + expect(url.length).toBe(5); + expect(url[0]).toEqual('/'); + expect(url[1]).toEqual('h'); + expect(localStorage['userId']).toBe('test Usr'); })); }); + -- cgit 1.2.3-korg