summaryrefslogtreecommitdiff
path: root/spec/finders
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-20 21:14:25 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-20 21:14:25 +0000
commit40a329556f63d919a68dd80bb37b087d1f0e6336 (patch)
tree86c2712bf48f66d0e7dbe7e115e5f01c78193ad0 /spec/finders
parent96b01499986c01d0c95176860a7606b7616a3836 (diff)
downloadgitlab-ce-40a329556f63d919a68dd80bb37b087d1f0e6336.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/finders')
-rw-r--r--spec/finders/abuse_reports_finder_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/finders/abuse_reports_finder_spec.rb b/spec/finders/abuse_reports_finder_spec.rb
index d3b148375d4..ee93d042ca2 100644
--- a/spec/finders/abuse_reports_finder_spec.rb
+++ b/spec/finders/abuse_reports_finder_spec.rb
@@ -78,6 +78,24 @@ RSpec.describe AbuseReportsFinder, '#execute' do
expect(subject).to match_array([abuse_report_2])
end
end
+
+ context 'when value is not a valid status' do
+ let(:params) { { status: 'partial' } }
+
+ it 'defaults to returning open abuse reports' do
+ expect(subject).to match_array([abuse_report_1])
+ end
+ end
+
+ context 'when abuse_reports_list feature flag is disabled' do
+ before do
+ stub_feature_flags(abuse_reports_list: false)
+ end
+
+ it 'does not filter by status' do
+ expect(subject).to match_array([abuse_report_1, abuse_report_2])
+ end
+ end
end
context 'when params[:category] is present' do