From 4045f815893c02a55e525aad308a26af2ef5fb86 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Thu, 7 Apr 2022 11:58:53 +0100 Subject: [PATCH] Use translation string in test --- spec/features/admin_panel_spec.rb | 2 +- spec/features/user_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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