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

fix(auth): auto submit auth form if needed

This commit is contained in:
Krishna Acondy
2021-02-08 19:07:37 +00:00
parent 70d3e25c7f
commit 1b251f1cea
2 changed files with 26 additions and 5 deletions

View File

@@ -141,10 +141,17 @@ describe('AuthManager', () => {
loginForm: { name: 'test' }
})
)
mockedAxios.post.mockImplementation(() =>
mockedAxios.post.mockImplementationOnce(() =>
Promise.resolve({
data: mockLoginAuthoriseRequiredResponse,
config: { url: 'https://test.com/SASLogon/login' }
config: { url: 'https://test.com/SASLogon/login' },
request: { responseURL: 'https://test.com/OAuth/authorize' }
})
)
mockedAxios.get.mockImplementationOnce(() =>
Promise.resolve({
data: mockLoginAuthoriseRequiredResponse
})
)