diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/lib/gitlab/auth/o_auth/user_spec.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/lib/gitlab/auth/o_auth/user_spec.rb')
-rw-r--r-- | spec/lib/gitlab/auth/o_auth/user_spec.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/lib/gitlab/auth/o_auth/user_spec.rb b/spec/lib/gitlab/auth/o_auth/user_spec.rb index bb81621ec92..beeb3ca7011 100644 --- a/spec/lib/gitlab/auth/o_auth/user_spec.rb +++ b/spec/lib/gitlab/auth/o_auth/user_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::Auth::OAuth::User do +RSpec.describe Gitlab::Auth::OAuth::User, feature_category: :authentication_and_authorization do include LdapHelpers let(:oauth_user) { described_class.new(auth_hash) } @@ -329,7 +329,7 @@ RSpec.describe Gitlab::Auth::OAuth::User do context "and no LDAP provider defined" do before do - stub_ldap_config(providers: []) + allow(Gitlab::Auth::Ldap::Config).to receive(:providers).at_least(:once).and_return([]) end include_examples "to verify compliance with allow_single_sign_on" @@ -509,6 +509,8 @@ RSpec.describe Gitlab::Auth::OAuth::User do context "and no corresponding LDAP person" do before do allow(Gitlab::Auth::Ldap::Person).to receive(:find_by_uid).and_return(nil) + allow(Gitlab::Auth::Ldap::Person).to receive(:find_by_email).and_return(nil) + allow(Gitlab::Auth::Ldap::Person).to receive(:find_by_dn).and_return(nil) end include_examples "to verify compliance with allow_single_sign_on" @@ -935,7 +937,7 @@ RSpec.describe Gitlab::Auth::OAuth::User do end it "does not update the user location" do - expect(gl_user.location).to be_nil + expect(gl_user.location).to be_blank expect(gl_user.user_synced_attributes_metadata.location_synced).to be(false) end end |