Adjust `fails to access route` spec for role-constrained routes
This commit is contained in:
parent
d75bff937e
commit
8a69d7c583
|
@ -8,7 +8,8 @@ describe "role-constrained routes", type: :request do
|
||||||
it "fails to access route" do
|
it "fails to access route" do
|
||||||
# 302 = redirect to login
|
# 302 = redirect to login
|
||||||
# 404 = no user found -- we have a fallback route if something could not be matched
|
# 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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue