Restore pagination to admin abuse reports

This commit is contained in:
Eric Eastwood 2017-02-14 10:16:24 -06:00
parent 1452729304
commit ae69e8764c
3 changed files with 24 additions and 0 deletions

View File

@ -12,6 +12,7 @@
%th.wide Message
%th Action
= render @abuse_reports
= paginate @abuse_reports, theme: 'gitlab'
- else
.empty-state
.text-center

View File

@ -0,0 +1,4 @@
---
title: Restore pagination to admin abuse reports
merge_request:
author:

View File

@ -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