summaryrefslogtreecommitdiff
path: root/spec/features/users/logout_spec.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-02-22 12:44:14 +0100
committerRémy Coutable <remy@rymai.me>2018-02-22 12:44:14 +0100
commitfc7f1aa244731aede4b61e5415b1c9924abba602 (patch)
tree4fa12064de6b1ee3a2a495820c2fd93b8aa15733 /spec/features/users/logout_spec.rb
parent1e52d1f6d0155448b819d846983d76ad70d0217f (diff)
downloadgitlab-ce-fc7f1aa244731aede4b61e5415b1c9924abba602.tar.gz
Fix user feature specs that were hardcoding 'user1'43495-spec-failure-spec-features-users_spec-rb
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/features/users/logout_spec.rb')
-rw-r--r--spec/features/users/logout_spec.rb22
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