diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-04 00:10:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-04 00:10:35 +0300 |
commit | 16f41a5b04934bb7a7a26ac2d6516cb44b7932e3 (patch) | |
tree | dd3f93c5a6760d456528d6f932db6450bf5bb553 /spec/models/identity_spec.rb | |
parent | bbc36645d34c557df40d031a1a41fbd05e491644 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/identity_spec.rb')
-rw-r--r-- | spec/models/identity_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/models/identity_spec.rb b/spec/models/identity_spec.rb index c0efb2dff56..124c54a2028 100644 --- a/spec/models/identity_spec.rb +++ b/spec/models/identity_spec.rb @@ -118,19 +118,19 @@ RSpec.describe Identity do it 'if extern_uid changes' do expect(ldap_identity).not_to receive(:ensure_normalized_extern_uid) - ldap_identity.save + ldap_identity.save! end it 'if current_uid is nil' do expect(ldap_identity).to receive(:ensure_normalized_extern_uid) - ldap_identity.update(extern_uid: nil) + ldap_identity.update!(extern_uid: nil) expect(ldap_identity.extern_uid).to be_nil end it 'if extern_uid changed and not nil' do - ldap_identity.update(extern_uid: 'uid=john1,ou=PEOPLE,dc=example,dc=com') + ldap_identity.update!(extern_uid: 'uid=john1,ou=PEOPLE,dc=example,dc=com') expect(ldap_identity.extern_uid).to eq 'uid=john1,ou=people,dc=example,dc=com' end @@ -150,7 +150,7 @@ RSpec.describe Identity do expect(user.user_synced_attributes_metadata.provider).to eq 'ldapmain' - ldap_identity.destroy + ldap_identity.destroy! expect(user.reload.user_synced_attributes_metadata).to be_nil end @@ -162,7 +162,7 @@ RSpec.describe Identity do expect(user.user_synced_attributes_metadata.provider).to eq 'other' - ldap_identity.destroy + ldap_identity.destroy! expect(user.reload.user_synced_attributes_metadata.provider).to eq 'other' end |