Yet, another errors

This commit is contained in:
Kamil Trzcinski 2017-04-07 18:05:39 +02:00
parent 0872b854cb
commit 3ea4a13925
No known key found for this signature in database
GPG Key ID: 4505F5C7E12C6A5A
2 changed files with 5 additions and 2 deletions

View File

@ -13,6 +13,6 @@ class AddIndexToNextRunAtAndActive < ActiveRecord::Migration
end
def down
remove_index :ci_trigger_schedules, [:active, :next_run_at]
remove_concurrent_index :ci_trigger_schedules, [:active, :next_run_at]
end
end

View File

@ -57,7 +57,10 @@ describe TriggerScheduleWorker do
end
context 'when next_run_at is nil' do
let!(:trigger_schedule) { create(:ci_trigger_schedule, :nightly, next_run_at: nil) }
before
schedule = create(:ci_trigger_schedule, :nightly)
schedule.update_column(:next_run_at, nil)
end
it 'does not create a new pipeline' do
expect { worker.perform }.not_to change { Ci::Pipeline.count }