Add feature flag spec for process_build_service

This commit is contained in:
Shinya Maeda 2018-10-02 13:43:45 +09:00 committed by Alessio Caiazza
parent 8bc065e02d
commit 46fc55993a
1 changed files with 15 additions and 1 deletions

View File

@ -204,6 +204,20 @@ describe Ci::ProcessBuildService, '#execute' do
allow(Ci::BuildScheduleWorker).to receive(:perform_at) { }
end
it_behaves_like 'Scheduling properly', %w[success skipped]
context 'when ci_enable_scheduled_build is enabled' do
before do
stub_feature_flags(ci_enable_scheduled_build: true)
end
it_behaves_like 'Scheduling properly', %w[success skipped]
end
context 'when ci_enable_scheduled_build is enabled' do
before do
stub_feature_flags(ci_enable_scheduled_build: false)
end
it_behaves_like 'Actionizing properly', %w[success skipped]
end
end
end