diff --git a/app/models/organisation.rb b/app/models/organisation.rb index 150f3c69b..69aa59c97 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -105,11 +105,12 @@ class Organisation < ApplicationRecord def display_organisation_attributes attrs = [ { name: "Name", value: name, editable: true }, + { name: "Organisation ID", value: "ORG#{id}", editable: false }, { name: "Address", value: address_string, editable: true }, - { name: "Telephone_number", value: phone, editable: true }, + { name: "Telephone number", value: phone, editable: true }, { name: "Type of provider", value: display_provider_type, editable: false }, { name: "Registration number", value: housing_registration_no || "", editable: false }, - { name: "Rent_periods", value: rent_period_labels, editable: false, format: :bullet }, + { name: "Rent periods", value: rent_period_labels, editable: false, format: :bullet }, { name: "Owns housing stock", value: holds_own_stock ? "Yes" : "No", editable: false }, ].compact diff --git a/app/views/organisations/show.html.erb b/app/views/organisations/show.html.erb index f1afb275c..e39338651 100644 --- a/app/views/organisations/show.html.erb +++ b/app/views/organisations/show.html.erb @@ -17,7 +17,7 @@ <% @organisation.display_organisation_attributes.each do |attr| %> <% if can_edit_org?(current_user) && attr[:editable] %> <%= summary_list.row do |row| %> - <% row.key { attr[:name].to_s.humanize } %> + <% row.key { attr[:name] } %> <% row.value { details_html(attr) } %> <% row.action( visually_hidden_text: attr[:name].to_s.humanize.downcase, @@ -27,7 +27,7 @@ <% end %> <% else %> <%= summary_list.row do |row| %> - <% row.key { attr[:name].to_s.humanize } %> + <% row.key { attr[:name] } %> <% row.value { details_html(attr) } %> <% row.action %> <% end %> diff --git a/spec/models/organisation_spec.rb b/spec/models/organisation_spec.rb index e52317065..1b0567a0f 100644 --- a/spec/models/organisation_spec.rb +++ b/spec/models/organisation_spec.rb @@ -242,13 +242,14 @@ RSpec.describe Organisation, type: :model do it "does not include data protection agreement" do expect(organisation.display_organisation_attributes).to eq( [{ editable: true, name: "Name", value: "DLUHC" }, + { editable: false, name: "Organisation ID", value: "ORG#{organisation.id}" }, { editable: true, name: "Address", value: "2 Marsham Street\nLondon\nSW1P 4DF" }, - { editable: true, name: "Telephone_number", value: nil }, + { editable: true, name: "Telephone number", value: nil }, { editable: false, name: "Type of provider", value: "Local authority" }, { editable: false, name: "Registration number", value: "1234" }, - { editable: false, format: :bullet, name: "Rent_periods", value: %w[All] }, + { editable: false, format: :bullet, name: "Rent periods", value: %w[All] }, { editable: false, name: "Owns housing stock", value: "Yes" }], ) end @@ -262,13 +263,14 @@ RSpec.describe Organisation, type: :model do it "includes data protection agreement" do expect(organisation.display_organisation_attributes).to eq( [{ editable: true, name: "Name", value: "DLUHC" }, + { editable: false, name: "Organisation ID", value: "ORG#{organisation.id}" }, { editable: true, name: "Address", value: "2 Marsham Street\nLondon\nSW1P 4DF" }, - { editable: true, name: "Telephone_number", value: nil }, + { editable: true, name: "Telephone number", value: nil }, { editable: false, name: "Type of provider", value: "Local authority" }, { editable: false, name: "Registration number", value: "1234" }, - { editable: false, format: :bullet, name: "Rent_periods", value: %w[All] }, + { editable: false, format: :bullet, name: "Rent periods", value: %w[All] }, { editable: false, name: "Owns housing stock", value: "Yes" }, { editable: false, name: "Data protection agreement", value: "Accepted" }], ) diff --git a/spec/requests/delete_logs_controller_spec.rb b/spec/requests/delete_logs_controller_spec.rb index fd509d699..9a90a9d87 100644 --- a/spec/requests/delete_logs_controller_spec.rb +++ b/spec/requests/delete_logs_controller_spec.rb @@ -118,7 +118,7 @@ RSpec.describe "DeleteLogs", type: :request do end before do - post delete_logs_confirmation_lettings_logs_path, params: params + post delete_logs_confirmation_lettings_logs_path, params: end it "requires delete logs form data to be provided" do @@ -188,7 +188,7 @@ RSpec.describe "DeleteLogs", type: :request do end before do - post delete_logs_confirmation_lettings_logs_path, params: params + post delete_logs_confirmation_lettings_logs_path, params: end it "renders the list of logs table again" do @@ -358,7 +358,7 @@ RSpec.describe "DeleteLogs", type: :request do end before do - post delete_logs_confirmation_sales_logs_path, params: params + post delete_logs_confirmation_sales_logs_path, params: end it "requires delete logs form data to be provided" do @@ -428,7 +428,7 @@ RSpec.describe "DeleteLogs", type: :request do end before do - post delete_logs_confirmation_sales_logs_path, params: params + post delete_logs_confirmation_sales_logs_path, params: end it "renders the list of logs table again" do @@ -602,7 +602,7 @@ RSpec.describe "DeleteLogs", type: :request do end before do - post delete_lettings_logs_confirmation_organisation_path(id: organisation), params: params + post delete_lettings_logs_confirmation_organisation_path(id: organisation), params: end it "requires delete logs form data to be provided" do @@ -827,7 +827,7 @@ RSpec.describe "DeleteLogs", type: :request do end before do - post delete_sales_logs_confirmation_organisation_path(id: organisation), params: params + post delete_sales_logs_confirmation_organisation_path(id: organisation), params: end it "requires delete logs form data to be provided" do