Do not raise error if user is nil
I do not get when it happens
This commit is contained in:
parent
2248b76d09
commit
f54dfe6ead
2 changed files with 12 additions and 1 deletions
|
@ -189,6 +189,17 @@ describe FranceConnect::ParticulierController, type: :controller do
|
|||
|
||||
it_behaves_like "a method that needs a valid merge token"
|
||||
|
||||
context 'when the user is not found' do
|
||||
it 'does not log' do
|
||||
subject
|
||||
fci.reload
|
||||
|
||||
expect(fci.user).to be_nil
|
||||
expect(fci.merge_token).not_to be_nil
|
||||
expect(controller.current_user).to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the credentials are ok' do
|
||||
let!(:user) { create(:user, email: email, password: password) }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue