mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-16 08:30:07 +00:00
test(AuthManager): fixed
This commit is contained in:
@@ -67,7 +67,7 @@ describe('AuthManager', () => {
|
|||||||
jest.spyOn(authManager, 'checkSession').mockImplementation(() =>
|
jest.spyOn(authManager, 'checkSession').mockImplementation(() =>
|
||||||
Promise.resolve({
|
Promise.resolve({
|
||||||
isLoggedIn: true,
|
isLoggedIn: true,
|
||||||
userName: 'test',
|
userName,
|
||||||
loginForm: 'test'
|
loginForm: 'test'
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
@@ -75,7 +75,6 @@ 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)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -100,7 +99,6 @@ 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