From 1fb0bbeb3e925bce6e0ea3b13970b735648cb340 Mon Sep 17 00:00:00 2001 From: JG Date: Thu, 30 Jun 2022 08:01:58 +0100 Subject: [PATCH] switched from id to id to display due to failing tests --- spec/requests/organisations_controller_spec.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index e2237a673..d8a756734 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -65,9 +65,9 @@ RSpec.describe OrganisationsController, type: :request do end it "shows only schemes belonging to the same organisation" do - expect(page).to have_content(same_org_scheme.id) + expect(page).to have_content(same_org_scheme.id_to_display) schemes.each do |scheme| - expect(page).not_to have_content(scheme.id) + expect(page).not_to have_content(scheme.id_to_display) end end @@ -82,9 +82,9 @@ RSpec.describe OrganisationsController, type: :request do end it "returns matching results" do - expect(page).to have_content(searched_scheme.id) + expect(page).to have_content(searched_scheme.id_to_display) schemes.each do |scheme| - expect(page).not_to have_content(scheme.id) + expect(page).not_to have_content(scheme.id_to_display) end end @@ -122,9 +122,9 @@ RSpec.describe OrganisationsController, type: :request do end it "shows only schemes belonging to the same organisation" do - expect(page).to have_content(same_org_scheme.id) + expect(page).to have_content(same_org_scheme.id_to_display) schemes.each do |scheme| - expect(page).not_to have_content(scheme.id) + expect(page).not_to have_content(scheme.id_to_display) end end @@ -142,7 +142,7 @@ RSpec.describe OrganisationsController, type: :request do context "when searching" do let!(:searched_scheme) { FactoryBot.create(:scheme, organisation: user.organisation) } - let(:search_param) { searched_scheme.id } + let(:search_param) { searched_scheme.id_to_display } before do FactoryBot.create(:location, scheme: searched_scheme) @@ -150,9 +150,9 @@ RSpec.describe OrganisationsController, type: :request do end it "returns matching results" do - expect(page).to have_content(searched_scheme.id) + expect(page).to have_content(searched_scheme.id_to_display) schemes.each do |scheme| - expect(page).not_to have_content(scheme.id) + expect(page).not_to have_content(scheme.id_to_display) end end