I have a test that looks like this
test 'should get new' do
get new_organization_url
assert_response :success
end
When I run this test I get an error
Error:
OrganizationsControllerTest#test_should_get_new:
Pundit::AuthorizationNotPerformedError
In my organizations_controller
I was using
before_action :skip_authorization, only: [:create, :new]
Something odd I've noticed, if I implement the skip_authorization
as
before_action :skip_auth, only: [:create, :new]
def skip_auth
skip_authorization
end
This test passes. What's the difference, what am I missing?