<%= govuk_tabs(title: "Check your answers before creating this scheme") do |component| %>
diff --git a/app/views/schemes/show.html.erb b/app/views/schemes/show.html.erb
index 0e244e9a2..8e091bc02 100644
--- a/app/views/schemes/show.html.erb
+++ b/app/views/schemes/show.html.erb
@@ -10,7 +10,7 @@
<%= render partial: "organisations/headings", locals: { main: @scheme.service_name, sub: nil } %>
-<%= render SubNavigationComponent.new(items: scheme_items(request.path, @scheme.id, @scheme.locations.count.eql?(1) ? "1 location" : "#{@scheme.locations.count} locations")) %>
+<%= render SubNavigationComponent.new(items: scheme_items(request.path, @scheme.id, "Locations")) %>
diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb
index 43f966c1c..838b28801 100644
--- a/spec/features/schemes_spec.rb
+++ b/spec/features/schemes_spec.rb
@@ -198,12 +198,12 @@ RSpec.describe "Schemes scheme Features" do
it "shows service and locations tab" do
expect(page).to have_link("Scheme")
- expect(page).to have_link("#{scheme.locations.count} locations")
+ expect(page).to have_link("Locations")
end
context "when I click locations link" do
before do
- click_link("#{scheme.locations.count} locations")
+ click_link("Locations")
end
it "shows details of those locations" do
@@ -725,7 +725,7 @@ RSpec.describe "Schemes scheme Features" do
context "when I click to see locations" do
before do
- click_link "1 location"
+ click_link "Locations"
end
it "I see location details" do
diff --git a/spec/helpers/navigation_items_helper_spec.rb b/spec/helpers/navigation_items_helper_spec.rb
index 90a96017b..60d0f3d0e 100644
--- a/spec/helpers/navigation_items_helper_spec.rb
+++ b/spec/helpers/navigation_items_helper_spec.rb
@@ -190,13 +190,13 @@ RSpec.describe NavigationItemsHelper do
let(:expected_scheme_items) do
[
NavigationItemsHelper::NavigationItem.new("Scheme", "/schemes/1", true),
- NavigationItemsHelper::NavigationItem.new("1 location", "/schemes/1/locations", false),
+ NavigationItemsHelper::NavigationItem.new("Locations", "/schemes/1/locations", false),
]
end
it "returns navigation items with Schemes item set as current" do
expect(primary_items("/schemes/1", current_user)).to eq(expected_navigation_items)
- expect(scheme_items("/schemes/1", 1, "1 location")).to eq(expected_scheme_items)
+ expect(scheme_items("/schemes/1", 1, "Locations")).to eq(expected_scheme_items)
end
end
@@ -213,13 +213,13 @@ RSpec.describe NavigationItemsHelper do
let(:expected_scheme_items) do
[
NavigationItemsHelper::NavigationItem.new("Scheme", "/schemes/1", false),
- NavigationItemsHelper::NavigationItem.new("1 location", "/schemes/1/locations", true),
+ NavigationItemsHelper::NavigationItem.new("Locations", "/schemes/1/locations", true),
]
end
it "returns navigation items with Schemes item set as current" do
expect(primary_items("/schemes/1/locations", current_user)).to eq(expected_navigation_items)
- expect(scheme_items("/schemes/1/locations", 1, "1 location")).to eq(expected_scheme_items)
+ expect(scheme_items("/schemes/1/locations", 1, "Locations")).to eq(expected_scheme_items)
end
end
diff --git a/spec/requests/locations_controller_spec.rb b/spec/requests/locations_controller_spec.rb
index e3909e754..8d1fce823 100644
--- a/spec/requests/locations_controller_spec.rb
+++ b/spec/requests/locations_controller_spec.rb
@@ -418,7 +418,7 @@ RSpec.describe LocationsController, type: :request do
it "updates existing location for scheme with valid params and redirects to correct page" do
follow_redirect!
expect(response).to have_http_status(:ok)
- expect(page).to have_content("1 location")
+ expect(page).to have_content("Locations")
end
it "updates existing location for scheme with valid params" do
@@ -541,7 +541,7 @@ RSpec.describe LocationsController, type: :request do
it "updates existing location for scheme with valid params and redirects to correct page" do
follow_redirect!
expect(response).to have_http_status(:ok)
- expect(page).to have_content("1 location")
+ expect(page).to have_content("Locations")
end
it "updates existing location for scheme with valid params" do