Commit f228f23a authored by Shinya Maeda's avatar Shinya Maeda Committed by Alessio Caiazza

Fix process build service spec

parent 8ed7b340
...@@ -20,11 +20,16 @@ describe Ci::ProcessBuildService, '#execute' do ...@@ -20,11 +20,16 @@ describe Ci::ProcessBuildService, '#execute' do
end end
it 'schedules the build' do it 'schedules the build' do
Timecop.freeze do
expect(Ci::BuildScheduleWorker)
.to receive(:perform_at).with(1.minute.since, build.id)
subject subject
expect(build).to be_scheduled expect(build).to be_scheduled
end end
end end
end
context 'when ci_enable_scheduled_build feature flag is disabled' do context 'when ci_enable_scheduled_build feature flag is disabled' do
before do before do
...@@ -34,7 +39,7 @@ describe Ci::ProcessBuildService, '#execute' do ...@@ -34,7 +39,7 @@ describe Ci::ProcessBuildService, '#execute' do
it 'enqueues the build' do it 'enqueues the build' do
subject subject
expect(build).to be_pending expect(build).to be_manual
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