Commit 5b66acec authored by Stan Hu's avatar Stan Hu

Move EE-specific code in destroy_pipeline_service_spec.rb

parent 425909a9
# 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