debian-mirror-gitlab/spec/lib/gitlab/sidekiq_versioning_spec.rb
2022-10-11 01:57:18 +05:30

19 lines
499 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Gitlab::SidekiqVersioning, :clean_gitlab_redis_queues do
before do
allow(Gitlab::SidekiqConfig).to receive(:worker_queues).and_return(%w[foo bar])
end
describe '.install!' do
it 'registers all versionless and versioned queues with Redis' do
described_class.install!
queues = Sidekiq::Queue.all.map(&:name)
expect(queues).to include('foo')
expect(queues).to include('bar')
end
end
end