summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-02-14 10:16:24 -0600
committerEric Eastwood <contact@ericeastwood.com>2017-02-16 17:02:58 -0600
commitae69e8764c273029ed944e98842a21a4aab0f4af (patch)
tree75cd6f81385114d2de8cb63c3922bd54786d25f8 /spec/features
parent1452729304393978ec93b712130dff6687db01b9 (diff)
downloadgitlab-ce-ae69e8764c273029ed944e98842a21a4aab0f4af.tar.gz
Restore pagination to admin abuse reports
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/admin/admin_abuse_reports_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/features/admin/admin_abuse_reports_spec.rb b/spec/features/admin/admin_abuse_reports_spec.rb
index 7fcfe5a54c7..340884fc986 100644
--- a/spec/features/admin/admin_abuse_reports_spec.rb
+++ b/spec/features/admin/admin_abuse_reports_spec.rb
@@ -30,5 +30,24 @@ describe "Admin::AbuseReports", feature: true, js: true do
end
end
end
+
+ describe 'if a many users have been reported for abuse' do
+ let(:report_count) { AbuseReport.default_per_page + 3 }
+
+ before do
+ report_count.times do
+ create(:abuse_report, user: create(:user))
+ end
+ end
+
+ describe 'in the abuse report view' do
+ it 'presents information about abuse report' do
+ visit admin_abuse_reports_path
+
+ expect(page).to have_selector('.pagination')
+ expect(page).to have_selector('.pagination .page', count: (report_count.to_f / AbuseReport.default_per_page).ceil)
+ end
+ end
+ end
end
end