From 83f2a8fe53ac3612ad10a444a31d7cb77bfeb228 Mon Sep 17 00:00:00 2001 From: Kat Date: Mon, 23 Oct 2023 09:20:41 +0100 Subject: [PATCH] Update tests --- spec/features/organisation_spec.rb | 4 ++-- spec/features/schemes_spec.rb | 4 ++-- .../organisation_relationships_controller_spec.rb | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/spec/features/organisation_spec.rb b/spec/features/organisation_spec.rb index 2ff74ac9d..9c24f2470 100644 --- a/spec/features/organisation_spec.rb +++ b/spec/features/organisation_spec.rb @@ -189,7 +189,7 @@ RSpec.describe "User Features" do end it "has correct page details" do - expect(page).to have_content("#{number_of_lettings_logs} total logs") + expect(page).to have_content("#{number_of_lettings_logs} matching logs") organisation.lettings_logs.map(&:id).each do |lettings_log_id| expect(page).to have_link lettings_log_id.to_s, href: "/lettings-logs/#{lettings_log_id}" end @@ -237,7 +237,7 @@ RSpec.describe "User Features" do end it "can filter sales logs" do - expect(page).to have_content("#{number_of_sales_logs} total logs") + expect(page).to have_content("#{number_of_sales_logs} matching logs") organisation.sales_logs.map(&:id).each do |sales_log_id| expect(page).to have_link sales_log_id.to_s, href: "/sales-logs/#{sales_log_id}" end diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index 02003e313..d7a9609f8 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -572,7 +572,7 @@ RSpec.describe "Schemes scheme Features" do it "displays information about a single location" do expect(page).to have_content "Locations" - expect(page).to have_content "#{scheme.locations.count} total location" + expect(page).to have_content "#{scheme.locations.count} matching location" end it "displays information about the first created location" do @@ -585,7 +585,7 @@ RSpec.describe "Schemes scheme Features" do fill_in_and_save_second_location click_button "Save and return to locations" expect(page).to have_content "Locations" - expect(page).to have_content "#{scheme.locations.count} total location" + expect(page).to have_content "#{scheme.locations.count} matching location" end it "displays information about newly created location" do diff --git a/spec/requests/organisation_relationships_controller_spec.rb b/spec/requests/organisation_relationships_controller_spec.rb index a93e77d76..dcf99efce 100644 --- a/spec/requests/organisation_relationships_controller_spec.rb +++ b/spec/requests/organisation_relationships_controller_spec.rb @@ -47,7 +47,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do end it "shows the pagination count" do - expect(page).to have_content("1 total stock owners") + expect(page).to have_content("1 matching stock owners") end context "when adding a stock owner" do @@ -113,7 +113,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do end it "shows the pagination count" do - expect(page).to have_content("1 total agents") + expect(page).to have_content("1 matching agents") end end @@ -285,7 +285,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do end it "shows the pagination count" do - expect(page).to have_content("1 total stock owners") + expect(page).to have_content("1 matching stock owners") end end @@ -421,7 +421,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do end it "shows the pagination count" do - expect(page).to have_content("1 total agents") + expect(page).to have_content("1 matching agents") end end @@ -587,7 +587,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do end it "shows the pagination count" do - expect(page).to have_content("1 total stock owners") + expect(page).to have_content("1 matching stock owners") end context "when adding a stock owner" do @@ -637,7 +637,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do end it "shows the pagination count" do - expect(page).to have_content("1 total agents") + expect(page).to have_content("1 matching agents") end it "shows remove link(s)" do