Browse Source

interpolate number of orgs

pull/557/head
Kat 3 years ago
parent
commit
2ebfdcbe60
  1. 3
      spec/requests/organisations_controller_spec.rb

3
spec/requests/organisations_controller_spec.rb

@ -358,9 +358,10 @@ RSpec.describe OrganisationsController, type: :request do
end end
it "shows all organisations" do 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 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_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 end
context "when viewing a specific organisation" do context "when viewing a specific organisation" do

Loading…
Cancel
Save