debian-mirror-gitlab/spec/sidekiq/cron/job_gem_dependency_spec.rb

21 lines
617 B
Ruby
Raw Normal View History

2019-12-26 22:10:19 +05:30
# frozen_string_literal: true
2017-09-10 17:25:29 +05:30
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Sidekiq::Cron::Job do
2017-09-10 17:25:29 +05:30
describe 'cron jobs' do
2019-03-02 22:35:43 +05:30
context 'when Fugit depends on ZoTime or EoTime' do
2017-09-10 17:25:29 +05:30
before do
described_class
2021-01-29 00:20:46 +05:30
.create(name: 'TestCronWorker', # rubocop:disable Rails/SaveBang
2017-09-10 17:25:29 +05:30
cron: Settings.cron_jobs[:pipeline_schedule_worker]['cron'],
class: Settings.cron_jobs[:pipeline_schedule_worker]['job_class'])
end
2019-03-02 22:35:43 +05:30
it 'does not get any errors' do
2017-09-10 17:25:29 +05:30
expect { described_class.all.first.should_enque?(Time.now) }.not_to raise_error
end
end
end
end