diff --git a/app/models/organisation.rb b/app/models/organisation.rb index 150f3c69b..2f4f8992e 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -105,6 +105,7 @@ 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: "Type of provider", value: display_provider_type, editable: false }, diff --git a/spec/models/organisation_spec.rb b/spec/models/organisation_spec.rb index e52317065..1d470e655 100644 --- a/spec/models/organisation_spec.rb +++ b/spec/models/organisation_spec.rb @@ -242,6 +242,7 @@ 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" }, + { name: "Organisation ID", value: "ORG#{organisation.id}", editable: false }, { editable: true, name: "Address", value: "2 Marsham Street\nLondon\nSW1P 4DF" }, @@ -262,6 +263,7 @@ 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" },