Commit 6580e40e authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'sh-clear-pipeline-status-cache-upon-destroy-ee' into 'master'

Move EE-specific code in destroy_pipeline_service_spec.rb

See merge request gitlab-org/gitlab-ee!10418
parents 6cab23c2 5b66acec
# frozen_string_literal: true
require 'spec_helper'
describe ::Ci::DestroyPipelineService do
let(:project) { create(:project) }
let!(:pipeline) { create(:ci_pipeline, project: project) }
let(:user) { project.owner }
subject { described_class.new(project, user).execute(pipeline) }
context 'when audit events is enabled' do
before do
stub_licensed_features(extended_audit_events: true, admin_audit_log: true)
end
it 'does not log an audit event' do
expect { subject }.not_to change { SecurityEvent.count }
end
end
end
......@@ -17,16 +17,6 @@ describe ::Ci::DestroyPipelineService do
expect { pipeline.reload }.to raise_error(ActiveRecord::RecordNotFound)
end
context 'when audit events is enabled' do
before do
stub_licensed_features(extended_audit_events: true, admin_audit_log: true)
end
it 'does not log an audit event' do
expect { subject }.not_to change { SecurityEvent.count }
end
end
context 'when the pipeline has jobs' do
let!(:build) { create(:ci_build, project: project, pipeline: pipeline) }
......
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