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

strategies_spec.rb « duplicate_jobs « sidekiq_middleware « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6ecc2a3a5f8ed5ae45cea2d5ca34a1ae422d909b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

require 'fast_spec_helper'

describe Gitlab::SidekiqMiddleware::DuplicateJobs::Strategies do
  describe '.for' do
    it 'returns the right class for `until_executing`' do
      expect(described_class.for(:until_executing)).to eq(described_class::UntilExecuting)
    end

    it 'raises an UnknownStrategyError when passing an unknown key' do
      expect { described_class.for(:unknown) }.to raise_error(described_class::UnknownStrategyError)
    end
  end
end