get :new
assert_response :redirect
- assert_redirected_to redactions_path
+ assert_redirected_to :controller => "errors", :action => "forbidden"
end
def test_create_moderator
session[:user] = create(:user).id
post :create, :params => { :redaction => { :title => "Foo", :description => "Description here." } }
- assert_response :forbidden
+ assert_response :redirect
+ assert_redirected_to :controller => "errors", :action => "forbidden"
end
def test_destroy_moderator_empty
session[:user] = create(:user).id
delete :destroy, :params => { :id => create(:redaction).id }
- assert_response :forbidden
+ assert_response :redirect
+ assert_redirected_to :controller => "errors", :action => "forbidden"
end
def test_edit
get :edit, :params => { :id => create(:redaction).id }
assert_response :redirect
- assert_redirected_to(redactions_path)
+ assert_redirected_to :controller => "errors", :action => "forbidden"
end
def test_update_moderator
redaction = create(:redaction)
put :update, :params => { :id => redaction.id, :redaction => { :title => "Foo", :description => "Description here." } }
- assert_response :forbidden
+ assert_response :redirect
+ assert_redirected_to :controller => "errors", :action => "forbidden"
end
end