Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-07-20 16:06:11 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-07-20 16:06:11 +0300
commit33e11345e086678fce7591bcd1d465f879d838e7 (patch)
treed3faea3c4bead6c5080876ccb6c39e42683ef84d /spec/features/users
parentac4b954c5fabbfa98fb72d88526a30713a20af5d (diff)
Add custom expectations for authentication activity metrics
Diffstat (limited to 'spec/features/users')
-rw-r--r--spec/features/users/login_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb
index 7a268c54de5..950385bc15c 100644
--- a/spec/features/users/login_spec.rb
+++ b/spec/features/users/login_spec.rb
@@ -3,6 +3,10 @@ require 'spec_helper'
describe 'Login' do
include TermsHelper
+ before do
+ stub_authentication_activity_metrics
+ end
+
it 'Successful user signin invalidates password reset token' do
user = create(:user)
@@ -29,7 +33,6 @@ describe 'Login' do
User.delete_all
user = create(:admin, password_automatically_set: true)
- expect(Gitlab::Auth::Activity).to increment(:user_authenticated_counter)
visit root_path
expect(current_path).to eq edit_user_password_path
@@ -47,6 +50,7 @@ describe 'Login' do
click_button 'Sign in'
expect(current_path).to eq root_path
+ expect(authentication_metrics).to have_incremented(:user_authenticated_counter)
end
it 'does not show flash messages when login page' do