SessionControllerSpec: remove specific attribut test

change user.update(log_in_with_france_connect: nil) as log_in_france_connect is an enum
This commit is contained in:
simon lehericey 2019-01-09 11:18:53 +01:00
parent 9e26b5f4d8
commit b38fbc78ef
2 changed files with 1 additions and 9 deletions

View file

@ -21,7 +21,7 @@ class Users::SessionsController < Sessions::SessionsController
try_to_authenticate(Administrateur, remember_me)
if user_signed_in?
current_user.update(loged_in_with_france_connect: '')
current_user.update(loged_in_with_france_connect: nil)
end
if gestionnaire_signed_in?

View file

@ -7,16 +7,8 @@ describe Users::SessionsController, type: :controller do
end
describe '#create' do
describe 'France Connect attribut' do
before do
post :create, params: { user: { email: user.email, password: user.password } }
user.reload
end
subject { user.loged_in_with_france_connect.present? }
it { is_expected.to be_falsey }
end
context "unified login" do
let(:email) { 'unique@plop.com' }