From 2ebfdcbe60527b9e321c6f9bd6ff604f72b4f4e9 Mon Sep 17 00:00:00 2001 From: Kat Date: Mon, 23 May 2022 14:52:12 +0100 Subject: [PATCH] interpolate number of orgs --- spec/requests/organisations_controller_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index b3b250aaa..342c6f36c 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -358,9 +358,10 @@ RSpec.describe OrganisationsController, type: :request do end it "shows all organisations" do + total_number_of_orgs = Organisation.all.count expect(page).to have_link organisation.name, href: "organisations/#{organisation.id}/logs" expect(page).to have_link unauthorised_organisation.name, href: "organisations/#{unauthorised_organisation.id}/logs" - expect(page).to have_content("2 total organisations") + expect(page).to have_content("#{total_number_of_orgs} total organisations") end context "when viewing a specific organisation" do