tech(user.expiration): ne perds pas de vue qu'il faut mettre a jour le users.last_sign_in_at

This commit is contained in:
Martin 2023-11-17 11:21:01 +01:00 committed by mfo
parent 520863d814
commit 14b2fc30b2
2 changed files with 2 additions and 1 deletions

View file

@ -56,6 +56,7 @@ describe FranceConnect::ParticulierController, type: :controller do
let(:fc_user) { create(:user, email: 'associated_user@a.com') }
it { expect { subject }.not_to change { FranceConnectInformation.count } }
it { expect { subject }.to change { fc_user.reload.last_sign_in_at } }
it 'signs in with the fci associated user' do
subject

View file

@ -25,7 +25,7 @@ describe Users::SessionsController, type: :controller do
context 'when the credentials are right' do
it 'signs in' do
subject
expect { subject }.to change { user.reload.last_sign_in_at }
expect(response).to redirect_to(root_path)
expect(controller.current_user).to eq(user)