Commit 9953e287 authored by Igor Drozdov's avatar Igor Drozdov

Merge branch '29279-add-resend-confirmation-link-to-login-failure-message' into 'master'

Expand the Devise unconfirmed message

See merge request gitlab-org/gitlab!34818
parents 3782ef76 6052d023
---
title: Improve error message when unconfirmed user tries to log in
merge_request: 34818
author:
type: changed
......@@ -15,7 +15,7 @@ en:
not_found_in_database: "Invalid %{authentication_keys} or password."
timeout: "Your session expired. Please sign in again to continue."
unauthenticated: "You need to sign in or sign up before continuing."
unconfirmed: "You have to confirm your email address before continuing."
unconfirmed: "You have to confirm your email address before continuing. Please check your email for the link we sent you, or click 'Resend confirmation email'."
mailer:
confirmation_instructions:
subject: "Confirmation instructions"
......
......@@ -163,7 +163,7 @@ RSpec.describe Groups::GroupMembersController do
post :request_access, params: { group_id: group }
expect(response).to redirect_to(new_user_session_path)
expect(response).to set_flash.to 'You have to confirm your email address before continuing.'
expect(response).to set_flash.to I18n.t('devise.failure.unconfirmed')
expect(group.requesters.exists?(user_id: requesting_user)).to be_falsey
expect(group.users).not_to include requesting_user
end
......
......@@ -110,7 +110,7 @@ RSpec.describe 'Login' do
gitlab_sign_in(user)
expect(page).not_to have_content('You have to confirm your email address before continuing.')
expect(page).not_to have_content(I18n.t('devise.failure.unconfirmed'))
expect(page).not_to have_link('Resend confirmation email', href: new_user_confirmation_path)
end
end
......@@ -124,7 +124,7 @@ RSpec.describe 'Login' do
gitlab_sign_in(user)
expect(page).to have_content('You have to confirm your email address before continuing.')
expect(page).to have_content(I18n.t('devise.failure.unconfirmed'))
expect(page).to have_link('Resend confirmation email', href: new_user_confirmation_path)
end
end
......@@ -820,7 +820,7 @@ RSpec.describe 'Login' do
gitlab_sign_in(user)
expect(current_path).to eq new_user_session_path
expect(page).to have_content('You have to confirm your email address before continuing.')
expect(page).to have_content(I18n.t('devise.failure.unconfirmed'))
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment