diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-03 01:07:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-03 01:07:33 +0300 |
commit | 0eb0daa071d5caa34385aba190ba5aece09b1527 (patch) | |
tree | 3e8c447803f0f6456e9ce17956c3727005475fea /spec/requests/abuse_reports_controller_spec.rb | |
parent | f91c598db1bfae546441b87715180b9925a85264 (diff) |
Add latest changes from gitlab-org/security/gitlab@15-11-stable-ee
Diffstat (limited to 'spec/requests/abuse_reports_controller_spec.rb')
-rw-r--r-- | spec/requests/abuse_reports_controller_spec.rb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/spec/requests/abuse_reports_controller_spec.rb b/spec/requests/abuse_reports_controller_spec.rb index 4b81394aea3..0b9cf24230d 100644 --- a/spec/requests/abuse_reports_controller_spec.rb +++ b/spec/requests/abuse_reports_controller_spec.rb @@ -19,43 +19,6 @@ RSpec.describe AbuseReportsController, feature_category: :insider_threat do sign_in(reporter) end - describe 'GET new' do - let(:ref_url) { 'http://example.com' } - - it 'sets the instance variables' do - get new_abuse_report_path(user_id: user.id, ref_url: ref_url) - - expect(assigns(:abuse_report)).to be_kind_of(AbuseReport) - expect(assigns(:abuse_report)).to have_attributes( - user_id: user.id, - reported_from_url: ref_url - ) - end - - context 'when the user has already been deleted' do - it 'redirects the reporter to root_path' do - user_id = user.id - user.destroy! - - get new_abuse_report_path(user_id: user_id) - - expect(response).to redirect_to root_path - expect(flash[:alert]).to eq(_('Cannot create the abuse report. The user has been deleted.')) - end - end - - context 'when the user has already been blocked' do - it 'redirects the reporter to the user\'s profile' do - user.block - - 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.')) - end - end - end - describe 'POST add_category', :aggregate_failures do subject(:request) { post add_category_abuse_reports_path, params: request_params } |