: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
I would normally test this by testing the redirect (assuming you are
redirecting users that do not have permission)
If someone does not have permission to view a page, I normally
redirect to another page and show a flash notice
so in the test I would say
def test_should_not_show_page_without_permission
get :show, :id => @first_id, :user => @user_id, :division =>
@division_id
assert_redirected_to notice_path # => specify your path here
assert_not_nil flash[:warning]
end
As a tip - when naming tests, it's good practice to use the term
"should" or "should not"
This helps you clearly define the behavior you are testing for.
example/
def test_login_page_should_render_with_login_form
end