diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index 1faa1048e..e047dfdfc 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -8,10 +8,10 @@ en: failure: already_authenticated: You are already signed in. inactive: Your account is not activated yet. - invalid: Invalid %{authentication_keys} or password. + invalid: Unable to login. last_attempt: You have one more attempt before your account is locked. - locked: Your account is locked. - not_found_in_database: Invalid %{authentication_keys} or password. + locked: Unable to login. + not_found_in_database: Unable to login. 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. @@ -61,4 +61,4 @@ en: not_locked: was not locked not_saved: one: '1 error prohibited this %{resource} from being saved:' - other: "%{count} errors prohibited this %{resource} from being saved:" + other: '%{count} errors prohibited this %{resource} from being saved:' diff --git a/spec/system/authentication/user_logs_in_with_email_spec.rb b/spec/system/authentication/user_logs_in_with_email_spec.rb index b73449645..7def11bc9 100644 --- a/spec/system/authentication/user_logs_in_with_email_spec.rb +++ b/spec/system/authentication/user_logs_in_with_email_spec.rb @@ -72,7 +72,7 @@ RSpec.describe "Authenticating with Email" do click_button("Continue", match: :first) expect(page).to have_current_path("/users/sign_in") - expect(page).to have_text("Invalid Email or password.") + expect(page).to have_text("Unable to login.") end end end diff --git a/spec/system/user_logs_in_with_password_spec.rb b/spec/system/user_logs_in_with_password_spec.rb index 39a36bac0..ec92713fb 100644 --- a/spec/system/user_logs_in_with_password_spec.rb +++ b/spec/system/user_logs_in_with_password_spec.rb @@ -20,15 +20,15 @@ RSpec.describe "Authenticating with a password" do it "displays an error when the email address is wrong" do submit_login_form("wrong@example.com", password) - expect(page).to have_text("Invalid Email or password.") + expect(page).to have_text("Unable to login.") end it "displays an error when the password is wrong" do submit_login_form(user.email, "wr0ng") - expect(page).to have_text("Invalid Email or password.") + expect(page).to have_text("Unable to login.") end - it "sends an email with the unlock link if the uset gets locked out", :aggregate_failures do + it "sends an email with the unlock link if the user gets locked out", :aggregate_failures do allow(User).to receive(:maximum_attempts).and_return(1) assert_enqueued_with(job: Devise.mailer.delivery_job) do