Browse Source

Use translation in spec

pull/430/head
baarkerlounger 3 years ago
parent
commit
b746b067a2
  1. 4
      spec/features/auth/user_lockout_spec.rb

4
spec/features/auth/user_lockout_spec.rb

@ -23,7 +23,7 @@ RSpec.describe "User Lockout" do
fill_in("user[password]", with: user.password) fill_in("user[password]", with: user.password)
click_button("Sign in") click_button("Sign in")
expect(page).to have_http_status(:unprocessable_entity) expect(page).to have_http_status(:unprocessable_entity)
expect(page).to have_content("Your account is locked.") expect(page).to have_content(I18n.t("devise.failure.locked"))
end end
end end
@ -43,7 +43,7 @@ RSpec.describe "User Lockout" do
fill_in("admin_user[password]", with: admin.password) fill_in("admin_user[password]", with: admin.password)
click_button("Sign in") click_button("Sign in")
expect(page).to have_http_status(:unprocessable_entity) expect(page).to have_http_status(:unprocessable_entity)
expect(page).to have_content("Your account is locked.") expect(page).to have_content(I18n.t("devise.failure.locked"))
end end
end end

Loading…
Cancel
Save