diff --git a/spec/features/admin_panel_spec.rb b/spec/features/admin_panel_spec.rb index 9ade961ed..7c721deac 100644 --- a/spec/features/admin_panel_spec.rb +++ b/spec/features/admin_panel_spec.rb @@ -39,7 +39,7 @@ RSpec.describe "Admin Panel" do fill_in("code", with: otp) click_button("Submit") expect(page).to have_content("Dashboard") - expect(page).to have_content("Two factor authentication successful.") + expect(page).to have_content(I18n.t("devise.two_factor_authentication.success")) end context "but it is more than 15 minutes old" do diff --git a/spec/features/user_spec.rb b/spec/features/user_spec.rb index 5cd035278..d142ad872 100644 --- a/spec/features/user_spec.rb +++ b/spec/features/user_spec.rb @@ -374,7 +374,7 @@ RSpec.describe "User Features" do fill_in("code", with: otp) click_button("Submit") expect(page).to have_content("Logs") - expect(page).to have_content("Two factor authentication successful.") + expect(page).to have_content(I18n.t("devise.two_factor_authentication.success")) end context "but it is more than 15 minutes old" do