Commit 08c769af authored by Sean Carroll's avatar Sean Carroll

Test merge_pipelines_enabled enhancements

parent 28fd62f4
......@@ -72,19 +72,42 @@ describe ProjectCiCdSetting do
before do
stub_licensed_features(merge_pipelines: true, merge_trains: true)
project.update(merge_pipelines_enabled: true)
end
context 'when merge pipelines option is disabled' do
context 'when merge pipelines option was enabled' 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
it { is_expected.to be true }
context 'when merge pipelines option is intact' do
it { is_expected.to be false }
end
end
context 'when merge pipelines option is intact' do
it { is_expected.to be false }
context 'when merge pipelines option was disabled' do
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
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