Commit aa03c1ac authored by Alex Kalderimis's avatar Alex Kalderimis

Move prometheus service policy tests to service_policy_spec

parent 2de1a4ef
......@@ -2,13 +2,15 @@
require 'spec_helper'
RSpec.describe PrometheusService, :models do
let(:integration) { create(:prometheus_service) }
RSpec.describe ServicePolicy, :models do
let_it_be(:user) { create(:user) }
let(:project) { integration.project }
let(:user) { create(:user) }
subject(:policy) { Ability.policy_for(user, integration) }
context 'when the integration is a prometheus_service' do
let(:integration) { create(:prometheus_service) }
describe 'rules' do
it { is_expected.to be_disallowed :admin_project }
......@@ -20,4 +22,5 @@ RSpec.describe PrometheusService, :models do
it { is_expected.to be_allowed :admin_project }
end
end
end
end
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