From 70eb5c05ee76bb26f56ec400ef96c0edbab3adb7 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Tue, 21 Jun 2022 17:26:50 +0100 Subject: [PATCH] =?UTF-8?q?Use=20=E2=80=98scheme=E2=80=99=20not=20?= =?UTF-8?q?=E2=80=98service=E2=80=99=20for=20scheme=20search=20label=20(#6?= =?UTF-8?q?87)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organisations/schemes.html.erb | 2 +- app/views/schemes/index.html.erb | 2 +- spec/features/schemes_spec.rb | 4 ++-- spec/helpers/tab_nav_helper_spec.rb | 2 +- spec/models/scheme_spec.rb | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/organisations/schemes.html.erb b/app/views/organisations/schemes.html.erb index ac64a6a07..364a26c0b 100644 --- a/app/views/organisations/schemes.html.erb +++ b/app/views/organisations/schemes.html.erb @@ -13,7 +13,7 @@

Supported housing schemes

-<%= render SearchComponent.new(current_user:, search_label: "Search by service name or code", value: @searched) %> +<%= render SearchComponent.new(current_user:, search_label: "Search by scheme name or code", value: @searched) %>
diff --git a/app/views/schemes/index.html.erb b/app/views/schemes/index.html.erb index 7d2ae2530..50affc921 100644 --- a/app/views/schemes/index.html.erb +++ b/app/views/schemes/index.html.erb @@ -7,7 +7,7 @@

Supported housing schemes

-<%= render SearchComponent.new(current_user:, search_label: "Search by service name or code", value: @searched) %> +<%= render SearchComponent.new(current_user:, search_label: "Search by scheme name or code", value: @searched) %>
diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index 719115dcc..463e17f56 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -32,7 +32,7 @@ RSpec.describe "Schemes scheme Features" do context "when I search for a specific scheme" do it "there is a search bar with a message and search button for schemes" do expect(page).to have_field("search") - expect(page).to have_content("Search by service name or code") + expect(page).to have_content("Search by scheme name or code") expect(page).to have_button("Search") end @@ -105,7 +105,7 @@ RSpec.describe "Schemes scheme Features" do context "when I search for a specific scheme" do it "there is a search bar with a message and search button for schemes" do expect(page).to have_field("search") - expect(page).to have_content("Search by service name or code") + expect(page).to have_content("Search by scheme name or code") expect(page).to have_button("Search") end diff --git a/spec/helpers/tab_nav_helper_spec.rb b/spec/helpers/tab_nav_helper_spec.rb index 7ec36f974..bd57a1c5a 100644 --- a/spec/helpers/tab_nav_helper_spec.rb +++ b/spec/helpers/tab_nav_helper_spec.rb @@ -20,7 +20,7 @@ RSpec.describe TabNavHelper do end describe "#scheme_cell" do - it "returns the scheme link service name and primary user group separated by a newline character" do + it "returns the scheme link, name and primary user group separated by a newline character" do expected_html = "#{scheme.service_name}\nScheme #{scheme.primary_client_group_display}" expect(scheme_cell(scheme)).to match(expected_html) end diff --git a/spec/models/scheme_spec.rb b/spec/models/scheme_spec.rb index bbeec6746..27221838d 100644 --- a/spec/models/scheme_spec.rb +++ b/spec/models/scheme_spec.rb @@ -23,7 +23,7 @@ RSpec.describe Scheme, type: :model do end end - context "when searching by service name" do + context "when searching by scheme name" do it "returns case insensitive matching records" do expect(described_class.search_by_service_name(scheme_1.service_name.upcase).count).to eq(1) expect(described_class.search_by_service_name(scheme_1.service_name.downcase).count).to eq(1)