diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/requests/verifies_with_email_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/requests/verifies_with_email_spec.rb')
-rw-r--r-- | spec/requests/verifies_with_email_spec.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/spec/requests/verifies_with_email_spec.rb b/spec/requests/verifies_with_email_spec.rb index 2f249952455..e8d3e94bd0e 100644 --- a/spec/requests/verifies_with_email_spec.rb +++ b/spec/requests/verifies_with_email_spec.rb @@ -18,7 +18,7 @@ RSpec.describe 'VerifiesWithEmail', :clean_gitlab_redis_sessions, :clean_gitlab_ it 'sends an email' do mail = find_email_for(user) expect(mail.to).to match_array([user.email]) - expect(mail.subject).to eq('Verify your identity') + expect(mail.subject).to eq(s_('IdentityVerification|Verify your identity')) end end @@ -50,7 +50,7 @@ RSpec.describe 'VerifiesWithEmail', :clean_gitlab_redis_sessions, :clean_gitlab_ it 'adds a verification error message' do expect(response.body) .to include("You've reached the maximum amount of tries. "\ - 'Wait 10 minutes or resend a new code and try again.') + 'Wait 10 minutes or send a new code and try again.') end end @@ -62,7 +62,8 @@ RSpec.describe 'VerifiesWithEmail', :clean_gitlab_redis_sessions, :clean_gitlab_ it_behaves_like 'prompt for email verification' it 'adds a verification error message' do - expect(response.body).to include(('The code is incorrect. Enter it again, or resend a new code.')) + expect(response.body) + .to include((s_('IdentityVerification|The code is incorrect. Enter it again, or send a new code.'))) end end @@ -75,7 +76,8 @@ RSpec.describe 'VerifiesWithEmail', :clean_gitlab_redis_sessions, :clean_gitlab_ it_behaves_like 'prompt for email verification' it 'adds a verification error message' do - expect(response.body).to include(('The code has expired. Resend a new code and try again.')) + expect(response.body) + .to include((s_('IdentityVerification|The code has expired. Send a new code and try again.'))) end end @@ -112,7 +114,8 @@ RSpec.describe 'VerifiesWithEmail', :clean_gitlab_redis_sessions, :clean_gitlab_ it 'redirects to the login form and shows an alert message' do expect(response).to redirect_to(new_user_session_path) - expect(flash[:alert]).to eq('Maximum login attempts exceeded. Wait 10 minutes and try again.') + expect(flash[:alert]) + .to eq(s_('IdentityVerification|Maximum login attempts exceeded. Wait 10 minutes and try again.')) end end @@ -217,6 +220,7 @@ RSpec.describe 'VerifiesWithEmail', :clean_gitlab_redis_sessions, :clean_gitlab_ describe 'successful_verification' do before do + allow(user).to receive(:role_required?).and_return(true) # It skips the required signup info before_action sign_in(user) end |