diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-02-16 23:50:52 +0000 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-02-16 23:50:52 +0000 |
commit | 416b94f27e84aa2ef5aa61fea58b2bd64a44ac99 (patch) | |
tree | 93bb3e07ab53d4c683ba9bb0771e6afbe9cd71dc /spec | |
parent | cee957f56c60649949da72a9ea01b2f6e7b0eb56 (diff) | |
parent | ae69e8764c273029ed944e98842a21a4aab0f4af (diff) | |
download | gitlab-ce-416b94f27e84aa2ef5aa61fea58b2bd64a44ac99.tar.gz |
Merge branch '28059-add-pagination-to-admin-abuse-reports' into 'master'
Restore pagination to admin abuse reports
Closes #28059
See merge request !9233
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/admin/admin_abuse_reports_spec.rb | 19 |
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 |