summaryrefslogtreecommitdiff
path: root/spec/requests/abuse_reports_controller_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-18 03:07:23 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-18 03:07:23 +0000
commit962afb3da11a72c7fca322378886b2c0be9f3385 (patch)
tree541e08c4d329ab62cfbadde45b0f15d2171e004e /spec/requests/abuse_reports_controller_spec.rb
parent8a560d56661f56804ddf6596f928e7d25db37443 (diff)
downloadgitlab-ce-962afb3da11a72c7fca322378886b2c0be9f3385.tar.gz
Add latest changes from gitlab-org/gitlab@masterHEADmaster
Diffstat (limited to 'spec/requests/abuse_reports_controller_spec.rb')
-rw-r--r--spec/requests/abuse_reports_controller_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/requests/abuse_reports_controller_spec.rb b/spec/requests/abuse_reports_controller_spec.rb
index 4b81394aea3..69b0fb41330 100644
--- a/spec/requests/abuse_reports_controller_spec.rb
+++ b/spec/requests/abuse_reports_controller_spec.rb
@@ -44,14 +44,14 @@ RSpec.describe AbuseReportsController, feature_category: :insider_threat do
end
end
- context 'when the user has already been blocked' do
+ context 'when the user has already been banned' do
it 'redirects the reporter to the user\'s profile' do
- user.block
+ user.ban
get new_abuse_report_path(user_id: user.id)
expect(response).to redirect_to user
- expect(flash[:alert]).to eq(_('Cannot create the abuse report. This user has been blocked.'))
+ expect(flash[:alert]).to eq(_('Cannot create the abuse report. This user has been banned.'))
end
end
end
@@ -127,16 +127,16 @@ RSpec.describe AbuseReportsController, feature_category: :insider_threat do
end
end
- context 'when the user has already been blocked' do
+ context 'when the user has already been banned' do
let(:request_params) { { user_id: user.id, abuse_report: { category: abuse_category } } }
it 'redirects the reporter to the user\'s profile' do
- user.block
+ user.ban
subject
expect(response).to redirect_to user
- expect(flash[:alert]).to eq(_('Cannot create the abuse report. This user has been blocked.'))
+ expect(flash[:alert]).to eq(_('Cannot create the abuse report. This user has been banned.'))
end
end
end