diff options
Diffstat (limited to 'spec/lib/gitlab/auth/o_auth/provider_spec.rb')
-rw-r--r-- | spec/lib/gitlab/auth/o_auth/provider_spec.rb | 18 |
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 |