Fix user session specs

This commit is contained in:
Andreas Nedbal 2022-07-30 14:35:47 +02:00 committed by Andreas Nedbal
parent a527329294
commit c131d3e024
1 changed files with 4 additions and 4 deletions

View File

@ -82,7 +82,7 @@ describe User::SessionsController do
it "redirects to the sign in page" do
expect(subject).to redirect_to :new_user_session
expect(flash[:notice]).to eq "#{I18n.t('flash.ban.error', name: user.screen_name)}\n#{I18n.t('flash.ban.reason', reason: 'Do not feed the animals')}"
expect(flash[:notice]).to eq "#{I18n.t("user.sessions.create.banned", name: user.screen_name)}\n#{I18n.t("user.sessions.create.reason", reason: 'Do not feed the animals')}"
end
end
@ -95,9 +95,9 @@ describe User::SessionsController do
it "redirects to the sign in page" do
expect(subject).to redirect_to :new_user_session
expect(flash[:notice]).to eq I18n.t("flash.ban.error", name: user.screen_name) +
"\n#{I18n.t('flash.ban.reason', reason: 'Do not feed the animals')}" \
"\n#{I18n.t('flash.ban.until', time: expiry)}"
expect(flash[:notice]).to eq I18n.t("user.sessions.create.banned", name: user.screen_name) +
"\n#{I18n.t("user.sessions.create.reason", reason: 'Do not feed the animals')}" \
"\n#{I18n.t("user.sessions.create.until", time: expiry)}"
end
end
end