diff options
Diffstat (limited to 'spec/workers/run_pipeline_schedule_worker_spec.rb')
-rw-r--r-- | spec/workers/run_pipeline_schedule_worker_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/workers/run_pipeline_schedule_worker_spec.rb b/spec/workers/run_pipeline_schedule_worker_spec.rb index 5fa7c5d64db..4fdf6149435 100644 --- a/spec/workers/run_pipeline_schedule_worker_spec.rb +++ b/spec/workers/run_pipeline_schedule_worker_spec.rb @@ -3,6 +3,10 @@ require 'spec_helper' RSpec.describe RunPipelineScheduleWorker do + it 'has an until_executed deduplicate strategy' do + expect(described_class.get_deduplicate_strategy).to eq(:until_executed) + end + describe '#perform' do let_it_be(:group) { create(:group) } let_it_be(:project) { create(:project, namespace: group) } @@ -11,6 +15,12 @@ RSpec.describe RunPipelineScheduleWorker do let(:worker) { described_class.new } + around do |example| + travel_to(pipeline_schedule.next_run_at + 1.hour) do + example.run + end + end + context 'when a schedule not found' do it 'does not call the Service' do expect(Ci::CreatePipelineService).not_to receive(:new) |