method
assert_response
v1.1.6 -
Show latest stable
- Class:
Test::Unit::Assertions
assert_response(type, message = nil)public
Asserts that the response is one of the following types:
- :success: Status code was 200
- :redirect: Status code was in the 300-399 range
- :missing: Status code was 404
- :error: Status code was in the 500-599 range
You can also pass an explicit status code number as the type, like assert_response(501)