diff options
Diffstat (limited to 'spec/policies/service_policy_spec.rb')
-rw-r--r-- | spec/policies/service_policy_spec.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/spec/policies/service_policy_spec.rb b/spec/policies/service_policy_spec.rb deleted file mode 100644 index 84c74ca7e31..00000000000 --- a/spec/policies/service_policy_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe ServicePolicy, :models do - let_it_be(:user) { create(:user) } - - let(:project) { integration.project } - - 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 } - - context 'when maintainer' do - before do - project.add_maintainer(user) - end - - it { is_expected.to be_allowed :admin_project } - end - end - end -end |