mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-18 19:26:00 +01:00
Adjust fails to access route
spec for role-constrained routes
This commit is contained in:
parent
d75bff937e
commit
8a69d7c583
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue