summaryrefslogtreecommitdiff
path: root/spec/features/users/login_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/users/login_spec.rb')
-rw-r--r--spec/features/users/login_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb
index 9d5780d29b0..122191af146 100644
--- a/spec/features/users/login_spec.rb
+++ b/spec/features/users/login_spec.rb
@@ -319,6 +319,16 @@ describe 'Login' do
expect(current_path).to eq root_path
expect(page).not_to have_content('You are already signed in.')
end
+
+ it 'does not show already signed in message when opening sign in page after login' do
+ expect(authentication_metrics)
+ .to increment(:user_authenticated_counter)
+
+ gitlab_sign_in(user)
+ visit new_user_session_path
+
+ expect(page).not_to have_content('You are already signed in.')
+ end
end
context 'with invalid username and password' do