Browse Source

feat: add org id to about page and update tests

pull/1715/head
natdeanlewissoftwire 3 years ago
parent
commit
1f6b95f399
  1. 1
      app/models/organisation.rb
  2. 2
      spec/models/organisation_spec.rb

1
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 },

2
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" },

Loading…
Cancel
Save