debian-mirror-gitlab/spec/workers/concerns/cronjob_queue_spec.rb

25 lines
472 B
Ruby
Raw Normal View History

2019-05-18 00:54:41 +05:30
# frozen_string_literal: true
2016-11-03 12:29:30 +05:30
require 'spec_helper'
describe CronjobQueue do
let(:worker) do
Class.new do
2018-03-17 18:26:18 +05:30
def self.name
'DummyWorker'
end
include ApplicationWorker
2016-11-03 12:29:30 +05:30
include CronjobQueue
end
end
it 'sets the queue name of a worker' do
2018-03-17 18:26:18 +05:30
expect(worker.sidekiq_options['queue'].to_s).to eq('cronjob:dummy')
2016-11-03 12:29:30 +05:30
end
it 'disables retrying of failed jobs' do
expect(worker.sidekiq_options['retry']).to eq(false)
end
end