diff --git a/app/helpers/locations_helper.rb b/app/helpers/locations_helper.rb index 6a76e8943..5a3b0fb24 100644 --- a/app/helpers/locations_helper.rb +++ b/app/helpers/locations_helper.rb @@ -32,7 +32,7 @@ module LocationsHelper { name: "Number of units", value: location.units, attribute: "units" }, { name: "Most common unit", value: location.type_of_unit, attribute: "type_of_unit" }, { name: "Mobility standards", value: location.mobility_type, attribute: "mobility_standards" }, - { name: "Location code", value: formatted_local_authority_timeline(location, "code"), attribute: "location_code" }, + { name: "Location code", value: location.id, attribute: "id" }, { name: "Availability", value: location_availability(location), attribute: "availability" }, ] end diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index d7a9609f8..e8af0af12 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -817,7 +817,7 @@ RSpec.describe "Schemes scheme Features" do expect(page).to have_content(deactivated_location.units) expect(page).to have_content(deactivated_location.type_of_unit) expect(page).to have_content(deactivated_location.mobility_type) - expect(page).to have_content(deactivated_location.location_code) + expect(page).to have_content(deactivated_location.id) expect(page).to have_content("Active from 4 April 2022 to 3 June 2022 Deactivated on 4 June 2022") expect(page).to have_content("Deactivated") end @@ -856,7 +856,7 @@ RSpec.describe "Schemes scheme Features" do expect(page).to have_content(location.units) expect(page).to have_content(location.type_of_unit) expect(page).to have_content(location.mobility_type) - expect(page).to have_content(location.location_code) + expect(page).to have_content(location.id) expect(page).to have_content("Active from 4 April 2022") expect(page).to have_content("Active") end diff --git a/spec/helpers/locations_helper_spec.rb b/spec/helpers/locations_helper_spec.rb index b86194918..976939acc 100644 --- a/spec/helpers/locations_helper_spec.rb +++ b/spec/helpers/locations_helper_spec.rb @@ -146,7 +146,7 @@ RSpec.describe LocationsHelper do { attribute: "units", name: "Number of units", value: location.units }, { attribute: "type_of_unit", name: "Most common unit", value: location.type_of_unit }, { attribute: "mobility_standards", name: "Mobility standards", value: location.mobility_type }, - { attribute: "location_code", name: "Location code", value: location.location_code }, + { attribute: "id", name: "Location code", value: location.id }, { attribute: "availability", name: "Availability", value: "Active from 1 April 2022" }, ] @@ -168,7 +168,7 @@ RSpec.describe LocationsHelper do { attribute: "units", name: "Number of units", value: location.units }, { attribute: "type_of_unit", name: "Most common unit", value: location.type_of_unit }, { attribute: "mobility_standards", name: "Mobility standards", value: location.mobility_type }, - { attribute: "location_code", name: "Location code", value: "E07000030 (until 31 March 2023)\nE06000063 (1 April 2023 - present)" }, + { attribute: "id", name: "Location code", value: location.id }, { attribute: "availability", name: "Availability", value: "Active from 1 April 2022" }, ] @@ -191,7 +191,7 @@ RSpec.describe LocationsHelper do { attribute: "units", name: "Number of units", value: location.units }, { attribute: "type_of_unit", name: "Most common unit", value: location.type_of_unit }, { attribute: "mobility_standards", name: "Mobility standards", value: location.mobility_type }, - { attribute: "location_code", name: "Location code", value: "" }, + { attribute: "id", name: "Location code", value: location.id }, { attribute: "availability", name: "Availability", value: "Active from 1 April 2022" }, ] diff --git a/spec/views/locations/show.html.erb_spec.rb b/spec/views/locations/show.html.erb_spec.rb index 65c6c07e2..4164e6baa 100644 --- a/spec/views/locations/show.html.erb_spec.rb +++ b/spec/views/locations/show.html.erb_spec.rb @@ -29,6 +29,7 @@ RSpec.describe "locations/show.html.erb" do let(:location) do instance_double( Location, + id: 5, name: "some location", postcode: "EC1N 2TD", linked_local_authorities: [],