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

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

require 'fast_spec_helper'

RSpec.describe Gitlab::APIAuthentication::SentThroughBuilder do
  describe '#sent_through' do
    let(:resolvers) { Array.new(3) { double } }
    let(:locators) { Array.new(3) { double } }

    it 'adds a strategy for each of locators x resolvers' do
      strategies = locators.to_h { |l| [l, []] }
      described_class.new(strategies, resolvers).sent_through(*locators)

      expect(strategies).to eq(locators.to_h { |l| [l, resolvers] })
    end
  end
end