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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/api_authentication/token_type_builder_spec.rb')
-rw-r--r--spec/lib/gitlab/api_authentication/token_type_builder_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/lib/gitlab/api_authentication/token_type_builder_spec.rb b/spec/lib/gitlab/api_authentication/token_type_builder_spec.rb
new file mode 100644
index 00000000000..fbca62c9a42
--- /dev/null
+++ b/spec/lib/gitlab/api_authentication/token_type_builder_spec.rb
@@ -0,0 +1,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