Commit 08562d64 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch...

Merge branch '33999-test-when-the-projectcicdsetting-merge_pipelines_enabled-goes-from-false-to-true' into 'master'

Test when the `ProjectCiCdSetting#merge_pipelines_enabled` goes from `false` to `true`

Closes #33999

See merge request gitlab-org/gitlab!18645
parents 0b107c71 08c769af
...@@ -72,19 +72,42 @@ describe ProjectCiCdSetting do ...@@ -72,19 +72,42 @@ describe ProjectCiCdSetting do
before do before do
stub_licensed_features(merge_pipelines: true, merge_trains: true) stub_licensed_features(merge_pipelines: true, merge_trains: true)
project.update(merge_pipelines_enabled: true)
end end
context 'when merge pipelines option is disabled' do context 'when merge pipelines option was enabled' do
before do before do
project.update(merge_pipelines_enabled: false) project.update(merge_pipelines_enabled: true)
end
context 'when merge pipelines option is disabled' do
before do
project.update(merge_pipelines_enabled: false)
end
it { is_expected.to be true }
end end
it { is_expected.to be true } context 'when merge pipelines option is intact' do
it { is_expected.to be false }
end
end end
context 'when merge pipelines option is intact' do context 'when merge pipelines option was disabled' do
it { is_expected.to be false } before do
project.update(merge_pipelines_enabled: false)
end
context 'when merge pipelines option is disabled' do
before do
project.update(merge_pipelines_enabled: true)
end
it { is_expected.to be false }
end
context 'when merge pipelines option is intact' do
it { is_expected.to be false }
end
end end
end end
end end
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