diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index 8324079d4..790d83684 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -326,7 +326,7 @@ RSpec.describe OrganisationsController, type: :request do let(:total_organisations_count) { Organisation.all.count } before do - allow(user).to receive(:need_two_factor_authentication?).and_return(false) + allow(support_user).to receive(:need_two_factor_authentication?).and_return(false) sign_in support_user get "/organisations" end @@ -342,6 +342,11 @@ RSpec.describe OrganisationsController, type: :request do it "shows which organisations are being shown on the current page" do expect(CGI.unescape_html(response.body)).to match("Showing 1 to 20 of #{total_organisations_count} organisations") end + + it "has pagination in the title" do + expect(page).to have_title("Organisations (page 1 of 2)") + end + end end end end