Welcome to mirror list, hosted at ThFree Co, Russian Federation.

job_gem_dependency_spec.rb « cron « sidekiq « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 38c658feba635aefb9521a39dd2a6394f889f885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Sidekiq::Cron::Job do
  describe 'cron jobs' do
    context 'when Fugit depends on ZoTime or EoTime' do
      before do
        described_class
          .create(name: 'TestCronWorker', # rubocop:disable Rails/SaveBang
                  cron: Settings.cron_jobs[:pipeline_schedule_worker]['cron'],
                  class: Settings.cron_jobs[:pipeline_schedule_worker]['job_class'])
      end

      it 'does not get any errors' do
        expect { described_class.all.first.should_enque?(Time.now) }.not_to raise_error
      end
    end
  end
end