diff options
Diffstat (limited to 'spec/models/ci/pipeline_spec.rb')
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index af6d7ab4250..79eb016bc41 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -3522,7 +3522,19 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do context 'when pipeline status is success' do let(:pipeline) { create(:ci_pipeline, :success, project: project) } - it { expect(subject).to be_truthy } + it 'can generate a codequality report' do + expect(subject).to be_truthy + end + + context 'when feature is disabled' do + before do + stub_feature_flags(codequality_mr_diff: false) + end + + it 'can not generate a codequality report' do + expect(subject).to be_falsey + end + end end end |