Fix user session specs
This commit is contained in:
parent
a527329294
commit
c131d3e024
|
@ -82,7 +82,7 @@ describe User::SessionsController do
|
||||||
|
|
||||||
it "redirects to the sign in page" do
|
it "redirects to the sign in page" do
|
||||||
expect(subject).to redirect_to :new_user_session
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -95,9 +95,9 @@ describe User::SessionsController do
|
||||||
|
|
||||||
it "redirects to the sign in page" do
|
it "redirects to the sign in page" do
|
||||||
expect(subject).to redirect_to :new_user_session
|
expect(subject).to redirect_to :new_user_session
|
||||||
expect(flash[:notice]).to eq I18n.t("flash.ban.error", name: user.screen_name) +
|
expect(flash[:notice]).to eq I18n.t("user.sessions.create.banned", name: user.screen_name) +
|
||||||
"\n#{I18n.t('flash.ban.reason', reason: 'Do not feed the animals')}" \
|
"\n#{I18n.t("user.sessions.create.reason", reason: 'Do not feed the animals')}" \
|
||||||
"\n#{I18n.t('flash.ban.until', time: expiry)}"
|
"\n#{I18n.t("user.sessions.create.until", time: expiry)}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue