Adjust tests with updated strings

This commit is contained in:
Karina Kwiatek 2023-01-09 18:44:11 +01:00
parent 7dcec41b5b
commit b27761229d
2 changed files with 3 additions and 3 deletions

View file

@ -52,7 +52,7 @@ describe Settings::TwoFactorAuthentication::OtpAuthenticationController, type: :
travel_to(Time.at(1603290888).utc) do
subject
expect(response).to redirect_to :settings_two_factor_authentication_otp_authentication
expect(flash[:error]).to eq("The code you entered was invalid.")
expect(flash[:error]).to eq(I18n.t("settings.two_factor_authentication.otp_authentication.update.error"))
end
end
end
@ -77,7 +77,7 @@ describe Settings::TwoFactorAuthentication::OtpAuthenticationController, type: :
travel_to(Time.at(1603290950).utc) do
subject
expect(response).to redirect_to :settings_two_factor_authentication_otp_authentication
expect(flash[:error]).to eq(I18n.t("errors.invalid_otp"))
expect(flash[:error]).to eq(I18n.t("settings.two_factor_authentication.otp_authentication.update.error"))
end
end
end

View file

@ -70,7 +70,7 @@ describe User::SessionsController do
it "redirects to the sign in page" do
expect(subject).to redirect_to :new_user_session
expect(flash[:error]).to eq I18n.t("errors.invalid_otp")
expect(flash[:error]).to eq I18n.t("user.sessions.create.error")
end
end
end