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/auth/o_auth/provider_spec.rb')
-rw-r--r--spec/lib/gitlab/auth/o_auth/provider_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/lib/gitlab/auth/o_auth/provider_spec.rb b/spec/lib/gitlab/auth/o_auth/provider_spec.rb
index c1b96819176..96a31c50989 100644
--- a/spec/lib/gitlab/auth/o_auth/provider_spec.rb
+++ b/spec/lib/gitlab/auth/o_auth/provider_spec.rb
@@ -90,6 +90,24 @@ RSpec.describe Gitlab::Auth::OAuth::Provider do
end
end
end
+
+ context 'for an OpenID Connect provider' do
+ before do
+ provider = ActiveSupport::InheritableOptions.new(
+ name: 'openid_connect',
+ args: ActiveSupport::InheritableOptions.new(name: 'custom_oidc')
+ )
+ allow(Gitlab.config.omniauth).to receive(:providers).and_return([provider])
+ end
+
+ context 'when the provider exists' do
+ subject { described_class.config_for('custom_oidc') }
+
+ it 'returns the config' do
+ expect(subject).to be_a(ActiveSupport::InheritableOptions)
+ end
+ end
+ end
end
describe '.label_for' do