-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't send request to one login when signing out after impersonation
- Loading branch information
1 parent
c3d741c
commit bf00204
Showing
2 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,7 +110,7 @@ | |
end | ||
end | ||
|
||
describe 'GET /auth/one-login/sign_out' do | ||
describe 'GET /auth/one-login/sign-out' do | ||
it 'redirects to one_login logout url' do | ||
create(:candidate, email_address: '[email protected]') | ||
|
||
|
@@ -162,9 +162,16 @@ | |
expect(response).to redirect_to candidate_interface_create_account_or_sign_in_path | ||
end | ||
end | ||
|
||
context 'session id_token is nil' do | ||
it 'redirects to sign_in page' do | ||
get auth_one_login_sign_out_path | ||
expect(response).to redirect_to candidate_interface_create_account_or_sign_in_path | ||
end | ||
end | ||
end | ||
|
||
describe 'GET /auth/one-login/sign_out_complete' do | ||
describe 'GET /auth/one-login/sign-out-complete' do | ||
context 'when candidate has a different one login token than the one returned by one login' do | ||
it 'redirects to logout_one_login_path and persists the session error message' do | ||
candidate = create(:candidate, email_address: '[email protected]') | ||
|