Module: Suhyo::ControllerMatchers
- Defined in:
- lib/suhyo/controller_matchers.rb
Defined Under Namespace
Classes: DenyAccess
Instance Method Summary collapse
-
#deny_access ⇒ Object
Looks for either of two things:.
Instance Method Details
#deny_access ⇒ Object
Looks for either of two things:
-
HTTP status code 403 Forbidden
-
Redirect to a certain access denied URL.
The access denied URL is determined by Suhyo.config.access_denied_url
, which defaults to http://test.host/login
.
Usage:
get :some_restricted_action
response.should deny_access
34 35 36 |
# File 'lib/suhyo/controller_matchers.rb', line 34 def deny_access DenyAccess.new end |