diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-19 09:08:45 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-19 09:08:45 +0000 |
commit | 035cd5ee5e42fda4a896ed43147ebf455fa2f5ba (patch) | |
tree | 447d9362dd26fb42828d13777ffc821d7129dc0d /spec/models/ci | |
parent | 7f12b2dc7406ceb8a9b1bbd730b38ad70fc88405 (diff) | |
download | gitlab-ce-035cd5ee5e42fda4a896ed43147ebf455fa2f5ba.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/ci')
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 5a50ce0911f..081fa6cbbae 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -3953,7 +3953,21 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do context 'when pipeline status is running' do let(:pipeline) { create(:ci_pipeline, :running) } - it { is_expected.to be_falsey } + context 'with mr_show_reports_immediately flag enabled' do + before do + stub_feature_flags(mr_show_reports_immediately: project) + end + + it { expect(subject).to be_truthy } + end + + context 'with mr_show_reports_immediately flag disabled' do + before do + stub_feature_flags(mr_show_reports_immediately: false) + end + + it { expect(subject).to be_falsey } + end end context 'when pipeline status is success' do @@ -4027,7 +4041,21 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do context 'when pipeline status is running' do let(:pipeline) { create(:ci_pipeline, :running) } - it { expect(subject).to be_falsey } + context 'with mr_show_reports_immediately flag enabled' do + before do + stub_feature_flags(mr_show_reports_immediately: project) + end + + it { expect(subject).to be_truthy } + end + + context 'with mr_show_reports_immediately flag disabled' do + before do + stub_feature_flags(mr_show_reports_immediately: false) + end + + it { expect(subject).to be_falsey } + end end context 'when pipeline status is success' do |