1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-03 18:50:05 +00:00

chore: test corrected for AuthManager

This commit is contained in:
Saad Jutt
2021-09-05 12:06:27 +05:00
parent 291ba51b07
commit e4956cc1d4

View File

@@ -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',