Commit ae5a198e authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Verify the policy rule has been executed

parent 118e1791
......@@ -28,6 +28,12 @@ RSpec.describe Projects::Security::VulnerabilitiesController do
let(:can_create_vulnerability) { true }
end
it 'checks if the user can create a vulnerability' do
request_new_vulnerability_page
expect(controller).to have_received(:can?).with(controller.current_user, :create_vulnerability, an_instance_of(Project))
end
context 'when user can create vulnerability' do
let(:can_create_vulnerability) { true }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment