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

Fix process build service spec

parent 8ed7b340
...@@ -20,9 +20,14 @@ describe Ci::ProcessBuildService, '#execute' do ...@@ -20,9 +20,14 @@ describe Ci::ProcessBuildService, '#execute' do
end end
it 'schedules the build' do it 'schedules the build' do
subject Timecop.freeze do
expect(Ci::BuildScheduleWorker)
.to receive(:perform_at).with(1.minute.since, build.id)
subject
expect(build).to be_scheduled expect(build).to be_scheduled
end
end end
end end
...@@ -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