Adjust `fails to access route` spec for role-constrained routes

This commit is contained in:
Andreas Nedbal 2022-08-20 22:02:22 +02:00 committed by Andreas Nedbal
parent d75bff937e
commit 8a69d7c583
1 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,8 @@ describe "role-constrained routes", type: :request do
it "fails to access route" do
# 302 = redirect to login
# 404 = no user found -- we have a fallback route if something could not be matched
expect(subject).to be_in [302, 404]
result = begin; subject; rescue ActionController::RoutingError; :no_route; end
expect(result).to be_in [302, 404, :no_route]
end
end