session[:user] = create(:user).id
get :new
- assert_response :redirect
- assert_redirected_to redactions_path
+ assert_response :forbidden
end
def test_create_moderator
delete :destroy, :params => { :id => redaction.id }
assert_response :redirect
assert_redirected_to(redaction_path(redaction))
- assert_match /^Redaction is not empty/, flash[:error]
+ assert_match(/^Redaction is not empty/, flash[:error])
end
def test_delete_non_moderator
session[:user] = create(:user).id
get :edit, :params => { :id => create(:redaction).id }
- assert_response :redirect
- assert_redirected_to(redactions_path)
+ assert_response :forbidden
end
def test_update_moderator