mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-05 11:40:06 +00:00
chore: test corrected for AuthManager
This commit is contained in:
@@ -75,6 +75,7 @@ describe('AuthManager', () => {
|
|||||||
const loginResponse = await authManager.logIn(userName, password)
|
const loginResponse = await authManager.logIn(userName, password)
|
||||||
|
|
||||||
expect(loginResponse.isLoggedIn).toBeTruthy()
|
expect(loginResponse.isLoggedIn).toBeTruthy()
|
||||||
|
expect(loginResponse.userName).toEqual(userName)
|
||||||
expect(authCallback).toHaveBeenCalledTimes(1)
|
expect(authCallback).toHaveBeenCalledTimes(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -88,7 +89,6 @@ describe('AuthManager', () => {
|
|||||||
jest.spyOn(authManager, 'checkSession').mockImplementation(() =>
|
jest.spyOn(authManager, 'checkSession').mockImplementation(() =>
|
||||||
Promise.resolve({
|
Promise.resolve({
|
||||||
isLoggedIn: false,
|
isLoggedIn: false,
|
||||||
userName: 'test',
|
|
||||||
loginForm: { name: 'test' }
|
loginForm: { name: 'test' }
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
@@ -99,6 +99,7 @@ describe('AuthManager', () => {
|
|||||||
const loginResponse = await authManager.logIn(userName, password)
|
const loginResponse = await authManager.logIn(userName, password)
|
||||||
|
|
||||||
expect(loginResponse.isLoggedIn).toBeTruthy()
|
expect(loginResponse.isLoggedIn).toBeTruthy()
|
||||||
|
expect(loginResponse.userName).toEqual(userName)
|
||||||
|
|
||||||
const loginParams = serialize({
|
const loginParams = serialize({
|
||||||
_service: 'default',
|
_service: 'default',
|
||||||
|
|||||||
Reference in New Issue
Block a user