diff options
author | Gosia Ksionek <mksionek@gitlab.com> | 2019-03-20 08:17:11 +0000 |
---|---|---|
committer | James Lopez <james@gitlab.com> | 2019-03-20 08:17:11 +0000 |
commit | 66d3354f367bd294792b199ab60fdca513e0ee92 (patch) | |
tree | 743628704439e424ea3da4695ba1d4de9de74cf4 /spec/features/users | |
parent | dd43abecf93035d36b649c75c05143cc08db1566 (diff) | |
download | gitlab-ce-66d3354f367bd294792b199ab60fdca513e0ee92.tar.gz |
Add additional link to 2fa page
Diffstat (limited to 'spec/features/users')
-rw-r--r-- | spec/features/users/login_spec.rb | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb index ad856bd062e..368a814874f 100644 --- a/spec/features/users/login_spec.rb +++ b/spec/features/users/login_spec.rb @@ -434,16 +434,22 @@ describe 'Login' do context 'within the grace period' do it 'redirects to two-factor configuration page' do - expect(authentication_metrics) - .to increment(:user_authenticated_counter) - - gitlab_sign_in(user) - - expect(current_path).to eq profile_two_factor_auth_path - expect(page).to have_content( - 'The group settings for Group 1 and Group 2 require you to enable ' \ - 'Two-Factor Authentication for your account. You need to do this ' \ - 'before ') + Timecop.freeze do + expect(authentication_metrics) + .to increment(:user_authenticated_counter) + + gitlab_sign_in(user) + + expect(current_path).to eq profile_two_factor_auth_path + expect(page).to have_content( + 'The group settings for Group 1 and Group 2 require you to enable '\ + 'Two-Factor Authentication for your account. '\ + 'You can leave Group 1 and leave Group 2. '\ + 'You need to do this '\ + 'before '\ + "#{(Time.zone.now + 2.days).strftime("%a, %-d %b %Y %H:%M:%S %z")}" + ) + end end it 'allows skipping two-factor configuration', :js do @@ -500,7 +506,8 @@ describe 'Login' do expect(current_path).to eq profile_two_factor_auth_path expect(page).to have_content( 'The group settings for Group 1 and Group 2 require you to enable ' \ - 'Two-Factor Authentication for your account.' + 'Two-Factor Authentication for your account. '\ + 'You can leave Group 1 and leave Group 2.' ) end end |