diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/lib/gitlab/auth/o_auth/provider_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
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 |