2019-10-24 08:06:03 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-05-10 11:48:09 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 11:08:50 -04:00
|
|
|
RSpec.describe Sidekiq::Cron::Job do
|
2017-05-10 11:48:09 -04:00
|
|
|
describe 'cron jobs' do
|
2019-01-08 10:36:38 -05:00
|
|
|
context 'when Fugit depends on ZoTime or EoTime' do
|
2017-05-10 11:48:09 -04:00
|
|
|
before do
|
|
|
|
described_class
|
|
|
|
.create(name: 'TestCronWorker',
|
|
|
|
cron: Settings.cron_jobs[:pipeline_schedule_worker]['cron'],
|
|
|
|
class: Settings.cron_jobs[:pipeline_schedule_worker]['job_class'])
|
|
|
|
end
|
|
|
|
|
2019-01-08 10:36:38 -05:00
|
|
|
it 'does not get any errors' do
|
2017-05-10 11:48:09 -04:00
|
|
|
expect { described_class.all.first.should_enque?(Time.now) }.not_to raise_error
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|