summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/api_authentication/token_type_builder_spec.rb
blob: fbca62c9a42897f0987c2337fd69a366c477ae22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

require 'fast_spec_helper'

RSpec.describe Gitlab::APIAuthentication::TokenTypeBuilder do
  describe '#token_types' do
    it 'passes strategies and resolvers to SentThroughBuilder' do
      strategies = double
      resolvers = Array.new(3) { double }
      retval = double
      expect(Gitlab::APIAuthentication::SentThroughBuilder).to receive(:new).with(strategies, resolvers).and_return(retval)

      expect(described_class.new(strategies).token_types(*resolvers)).to be(retval)
    end
  end
end