FC ParticulierController: cleaner update attribute

This commit is contained in:
Simon Lehericey 2018-01-16 15:33:37 +01:00
parent 2651c5e029
commit d70b6f4af0
2 changed files with 2 additions and 3 deletions

View file

@ -41,8 +41,7 @@ class FranceConnect::ParticulierController < ApplicationController
sign_in user
user.loged_in_with_france_connect = 'particulier'
user.save
user.update_attribute('loged_in_with_france_connect', 'particulier')
redirect_to stored_location_for(current_user) || signed_in_root_path(current_user)
end

View file

@ -53,7 +53,7 @@ describe FranceConnect::ParticulierController, type: :controller do
it do
subject
expect(user.reload.loged_in_with_france_connect?).to be_truthy
expect(user.reload.loged_in_with_france_connect).to eq('particulier')
end
context 'and the user has a stored location' do