Restore pagination to admin abuse reports
This commit is contained in:
parent
1452729304
commit
ae69e8764c
|
@ -12,6 +12,7 @@
|
|||
%th.wide Message
|
||||
%th Action
|
||||
= render @abuse_reports
|
||||
= paginate @abuse_reports, theme: 'gitlab'
|
||||
- else
|
||||
.empty-state
|
||||
.text-center
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Restore pagination to admin abuse reports
|
||||
merge_request:
|
||||
author:
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue