-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11156 from demarches-simplifiees/fix-current-user…
…-triggers-authentication Tech : Correction d'un comportement étrange sur la connexion par email / mot de passe
- Loading branch information
Showing
2 changed files
with
10 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -99,11 +99,12 @@ | |
|
||
context 'when email domain is in mandatory list' do | ||
let(:email) { '[email protected]' } | ||
it 'redirects to agent connect with force parameter' do | ||
it 'redirects to agent connect with force parameter and is not logged in' do | ||
expect(AgentConnectService).to receive(:enabled?).and_return(true) | ||
subject | ||
expect(response).to redirect_to(agent_connect_path(force_agent_connect: true)) | ||
expect(flash[:alert]).to eq("La connexion des agents passe à présent systématiquement par AgentConnect") | ||
expect(controller.current_user).to be_nil | ||
end | ||
end | ||
end | ||
|