Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-26 12:11:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-26 12:11:15 +0300
commitc8a7e4ada117b968f841c2bb300fadc421cb3e98 (patch)
treec7c84dd22cd56ea8ed228f91f4ab33c5a1e751fc /spec/models
parentb692f9afa047ef24c54ab185b499628d9873122a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/user_spec.rb6
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