2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-10-26 11:44:53 +02:00
|
|
|
describe 'Sign out' do
|
2019-08-14 16:58:50 +02:00
|
|
|
context 'when a user is logged in' do
|
2024-06-01 22:50:48 +02:00
|
|
|
let(:user) { administrateurs(:default_admin).user }
|
2019-08-14 16:58:50 +02:00
|
|
|
|
|
|
|
before { login_as user, scope: :user }
|
|
|
|
|
|
|
|
scenario 'he can sign out' do
|
|
|
|
visit dossiers_path
|
|
|
|
|
|
|
|
click_on 'Se déconnecter'
|
|
|
|
|
|
|
|
expect(page).to have_current_path(root_path)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|