From e4956cc1d401b1ff80e0bd8129bdfe73ddb92a50 Mon Sep 17 00:00:00 2001 From: Saad Jutt Date: Sun, 5 Sep 2021 12:06:27 +0500 Subject: [PATCH] chore: test corrected for AuthManager --- src/auth/spec/AuthManager.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/auth/spec/AuthManager.spec.ts b/src/auth/spec/AuthManager.spec.ts index 1fb6119..3d730c4 100644 --- a/src/auth/spec/AuthManager.spec.ts +++ b/src/auth/spec/AuthManager.spec.ts @@ -75,6 +75,7 @@ describe('AuthManager', () => { const loginResponse = await authManager.logIn(userName, password) expect(loginResponse.isLoggedIn).toBeTruthy() + expect(loginResponse.userName).toEqual(userName) expect(authCallback).toHaveBeenCalledTimes(1) }) @@ -88,7 +89,6 @@ describe('AuthManager', () => { jest.spyOn(authManager, 'checkSession').mockImplementation(() => Promise.resolve({ isLoggedIn: false, - userName: 'test', loginForm: { name: 'test' } }) ) @@ -99,6 +99,7 @@ describe('AuthManager', () => { const loginResponse = await authManager.logIn(userName, password) expect(loginResponse.isLoggedIn).toBeTruthy() + expect(loginResponse.userName).toEqual(userName) const loginParams = serialize({ _service: 'default',