diff --git a/app/views/schemes/check_answers.html.erb b/app/views/schemes/check_answers.html.erb
index 5c83abad0..7a5e98282 100644
--- a/app/views/schemes/check_answers.html.erb
+++ b/app/views/schemes/check_answers.html.erb
@@ -67,7 +67,7 @@
<% component.tab(label: "Locations") do %>
<%= govuk_table do |table| %>
<%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
- <%= render(SearchResultCaptionComponent.new(searched: nil, count: 1, item_label: "location", total_count: @scheme.locations.count, item: "schemes", path: request.path)) %>
+ <%= @scheme.locations.count %> <%= @scheme.locations.count.eql?(1) ? "location" : "locations" %>.
<% end %>
<%= table.head do |head| %>
<%= head.row do |row| %>
diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb
index 09af09750..554759bef 100644
--- a/spec/features/schemes_spec.rb
+++ b/spec/features/schemes_spec.rb
@@ -208,7 +208,7 @@ RSpec.describe "Schemes scheme Features" do
it "shows details of those locations" do
locations.each do |location|
- expect(page).to have_content(location.location_code)
+ expect(page).to have_content(location.id)
end
end
end
@@ -419,7 +419,7 @@ RSpec.describe "Schemes scheme Features" do
it "displays information about locations" do
expect(page).to have_content "Locations"
- expect(page).to have_content "#{scheme.locations.count} locations"
+ expect(page).to have_content "#{scheme.locations.count} location"
end
end
@@ -436,24 +436,6 @@ RSpec.describe "Schemes scheme Features" do
expect(page).to have_content scheme.stock_owning_organisation.name
expect(page).to have_content "#{scheme.organisation.name} has been created."
end
-
- context "when I press the back button" do
- before do
- click_link "Back"
- end
-
- it "lets me select the secondary group" do
- expect(page).to have_current_path("/schemes/#{scheme.id}/support")
- expect(page).to have_content "What support does this scheme provide?"
- end
-
- context "when we amend support" do
- it "returns to the add location page" do
- click_button "Save and continue"
- expect(page).to have_current_path("/schemes/#{scheme.id}/location/new")
- end
- end
- end
end
context "when changing answers" do
diff --git a/spec/requests/schemes_controller_spec.rb b/spec/requests/schemes_controller_spec.rb
index 2c1eb90ce..955248069 100644
--- a/spec/requests/schemes_controller_spec.rb
+++ b/spec/requests/schemes_controller_spec.rb
@@ -310,13 +310,9 @@ RSpec.describe SchemesController, type: :request do
it "shows scheme" do
locations.each do |location|
- expect(page).to have_content(location.location_code)
+ expect(page).to have_content(location.id)
expect(page).to have_content(location.postcode)
- expect(page).to have_content(location.county)
expect(page).to have_content(location.type_of_unit)
- expect(page).to have_content(location.type_of_building)
- expect(page).to have_content(location.wheelchair_adaptation)
- expect(page).to have_content(location.name)
end
end
@@ -391,13 +387,9 @@ RSpec.describe SchemesController, type: :request do
it "shows scheme" do
locations.each do |location|
- expect(page).to have_content(location.location_code)
+ expect(page).to have_content(location.id)
expect(page).to have_content(location.postcode)
- expect(page).to have_content(location.county)
expect(page).to have_content(location.type_of_unit)
- expect(page).to have_content(location.type_of_building)
- expect(page).to have_content(location.wheelchair_adaptation)
- expect(page).to have_content(location.name)
end
end