diff options
Diffstat (limited to 'spec/lib/gitlab/auth/ldap/user_spec.rb')
-rw-r--r-- | spec/lib/gitlab/auth/ldap/user_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/gitlab/auth/ldap/user_spec.rb b/spec/lib/gitlab/auth/ldap/user_spec.rb index cab2169593a..653c19942ea 100644 --- a/spec/lib/gitlab/auth/ldap/user_spec.rb +++ b/spec/lib/gitlab/auth/ldap/user_spec.rb @@ -25,20 +25,20 @@ describe Gitlab::Auth::LDAP::User do OmniAuth::AuthHash.new(uid: 'uid=John Smith,ou=People,dc=example,dc=com', provider: 'ldapmain', info: info_upper_case) end - describe '#changed?' do + describe '#should_save?' do it "marks existing ldap user as changed" do create(:omniauth_user, extern_uid: 'uid=John Smith,ou=People,dc=example,dc=com', provider: 'ldapmain') - expect(ldap_user.changed?).to be_truthy + expect(ldap_user.should_save?).to be_truthy end it "marks existing non-ldap user if the email matches as changed" do create(:user, email: 'john@example.com') - expect(ldap_user.changed?).to be_truthy + expect(ldap_user.should_save?).to be_truthy end it "does not mark existing ldap user as changed" do create(:omniauth_user, email: 'john@example.com', extern_uid: 'uid=john smith,ou=people,dc=example,dc=com', provider: 'ldapmain') - expect(ldap_user.changed?).to be_falsey + expect(ldap_user.should_save?).to be_falsey end end |