diff options
Diffstat (limited to 'spec/features/users/logout_spec.rb')
-rw-r--r-- | spec/features/users/logout_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/features/users/logout_spec.rb b/spec/features/users/logout_spec.rb new file mode 100644 index 00000000000..635729efa53 --- /dev/null +++ b/spec/features/users/logout_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe 'Logout/Sign out', :js do + let(:user) { create(:user) } + + before do + sign_in(user) + visit root_path + end + + it 'sign out redirects to sign in page' do + gitlab_sign_out + + expect(current_path).to eq new_user_session_path + end + + it 'sign out does not show signed out flash notice' do + gitlab_sign_out + + expect(page).not_to have_selector('.flash-notice') + end +end |