diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index 67d3359dd..b937bced3 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -353,6 +353,21 @@ RSpec.describe OrganisationsController, type: :request do it "shows the total organisations count" do expect(CGI.unescape_html(response.body)).to match("#{total_organisations_count} total organisations") end + + it "has pagination links" do + expect(page).to have_content("Previous") + expect(page).to have_link("Previous") + expect(page).to have_content("Next") + expect(page).not_to have_link("Next") + end + + it "shows which logs are being shown on the current page" do + expect(CGI.unescape_html(response.body)).to match("Showing 21 to #{total_organisations_count} of #{total_organisations_count} organisations") + end + + it "has pagination in the title" do + expect(page).to have_title("Organisations (page 2 of 2)") + end end end end