diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-26 12:11:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-26 12:11:15 +0300 |
commit | c8a7e4ada117b968f841c2bb300fadc421cb3e98 (patch) | |
tree | c7c84dd22cd56ea8ed228f91f4ab33c5a1e751fc /spec/models | |
parent | b692f9afa047ef24c54ab185b499628d9873122a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/user_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 26add23bde9..5245df10a71 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1919,15 +1919,15 @@ RSpec.describe User do user.ban! end - it 'activates the user' do - user.activate + it 'unbans the user' do + user.unban expect(user.banned?).to eq(false) expect(user.active?).to eq(true) end it 'deletes the BannedUser record' do - expect { user.activate }.to change { Users::BannedUser.count }.by(-1) + expect { user.unban }.to change { Users::BannedUser.count }.by(-1) expect(Users::BannedUser.where(user_id: user.id)).not_to exist end end |