diff --git a/app/helpers/data_sharing_agreement_helper.rb b/app/helpers/data_sharing_agreement_helper.rb index a24332cb6..79296e6dc 100644 --- a/app/helpers/data_sharing_agreement_helper.rb +++ b/app/helpers/data_sharing_agreement_helper.rb @@ -1,7 +1,7 @@ module DataSharingAgreementHelper def data_sharing_agreement_row(user:, organisation:, summary_list:) summary_list.with_row do |row| - row.with_key { "Data protection agreement" } + row.with_key { "Data Sharing Agreement" } row.with_action( href: data_sharing_agreement_organisation_path(organisation), text: "View agreement", diff --git a/app/helpers/organisations_helper.rb b/app/helpers/organisations_helper.rb index 1293d552f..7d37b9289 100644 --- a/app/helpers/organisations_helper.rb +++ b/app/helpers/organisations_helper.rb @@ -16,9 +16,9 @@ module OrganisationsHelper { name: "Telephone number", value: organisation.phone, editable: true }, { name: "Registration number", value: organisation.housing_registration_no || "", editable: false }, { name: "Type of provider", value: organisation.display_provider_type, editable: false }, - { name: "Owns housing stock?", value: organisation.holds_own_stock ? "Yes" : "No", editable: false }, + { name: "Owns housing stock", value: organisation.holds_own_stock ? "Yes" : "No", editable: false }, { name: "Rent periods", value: organisation.rent_period_labels, editable: true, format: :bullet }, - { name: "Data protection agreement" }, + { name: "Data Sharing Agreement" }, { name: "Status", value: status_tag(organisation.status), editable: false }, ] end diff --git a/app/views/organisations/show.html.erb b/app/views/organisations/show.html.erb index 9b22e3d1e..26a20926e 100644 --- a/app/views/organisations/show.html.erb +++ b/app/views/organisations/show.html.erb @@ -16,7 +16,7 @@ <%= govuk_summary_list do |summary_list| %> <%= organisation_name_row(user: current_user, organisation: @organisation, summary_list:) %> <% display_organisation_attributes(@organisation).each do |attr| %> - <% if attr[:name] == "Data protection agreement" %> + <% if attr[:name] == "Data Sharing Agreement" %> <%= data_sharing_agreement_row(organisation: @organisation, user: current_user, summary_list:) %> <% else %> <% if can_edit_org?(current_user) && attr[:editable] %> diff --git a/spec/helpers/organisations_helper_spec.rb b/spec/helpers/organisations_helper_spec.rb index b90f35d8a..9ebe12d1f 100644 --- a/spec/helpers/organisations_helper_spec.rb +++ b/spec/helpers/organisations_helper_spec.rb @@ -5,7 +5,7 @@ RSpec.describe OrganisationsHelper do describe "display_organisation_attributes" do let(:organisation) { create(:organisation) } - it "does not include data protection agreement" do + it "has the correct values" do expect(display_organisation_attributes(organisation)).to eq( [{ editable: false, name: "Organisation ID", value: "ORG#{organisation.id}" }, { editable: true, @@ -14,9 +14,9 @@ RSpec.describe OrganisationsHelper do { editable: true, name: "Telephone number", value: nil }, { editable: false, name: "Registration number", value: "1234" }, { editable: false, name: "Type of provider", value: "Local authority" }, - { editable: false, name: "Owns housing stock?", value: "Yes" }, + { editable: false, name: "Owns housing stock", value: "Yes" }, { editable: true, format: :bullet, name: "Rent periods", value: [] }, - { name: "Data protection agreement" }, + { name: "Data Sharing Agreement" }, { editable: false, name: "Status", value: status_tag(organisation.status) }], ) end diff --git a/spec/views/organisations/show.html.erb_spec.rb b/spec/views/organisations/show.html.erb_spec.rb index 7caf9d1f7..4314360dc 100644 --- a/spec/views/organisations/show.html.erb_spec.rb +++ b/spec/views/organisations/show.html.erb_spec.rb @@ -16,7 +16,7 @@ RSpec.describe "organisations/show.html.erb" do it "includes data sharing agreement row" do render - expect(fragment).to have_content("Data protection agreement") + expect(fragment).to have_content("Data Sharing Agreement") end it "shows data sharing agreement not accepted" do @@ -37,7 +37,7 @@ RSpec.describe "organisations/show.html.erb" do it "includes data sharing agreement row" do render - expect(fragment).to have_content("Data protection agreement") + expect(fragment).to have_content("Data Sharing Agreement") end it "shows data sharing agreement accepted" do @@ -60,7 +60,7 @@ RSpec.describe "organisations/show.html.erb" do it "includes data sharing agreement row" do render - expect(fragment).to have_content("Data protection agreement") + expect(fragment).to have_content("Data Sharing Agreement") end it "shows data sharing agreement not accepted" do @@ -87,7 +87,7 @@ RSpec.describe "organisations/show.html.erb" do it "includes data sharing agreement row" do render - expect(fragment).to have_content("Data protection agreement") + expect(fragment).to have_content("Data Sharing Agreement") end it "shows data sharing agreement accepted with date" do @@ -130,7 +130,7 @@ RSpec.describe "organisations/show.html.erb" do it "includes data sharing agreement row" do render - expect(fragment).to have_content("Data protection agreement") + expect(fragment).to have_content("Data Sharing Agreement") end it "shows data sharing agreement not accepted" do @@ -154,7 +154,7 @@ RSpec.describe "organisations/show.html.erb" do it "includes data sharing agreement row" do render - expect(fragment).to have_content("Data protection agreement") + expect(fragment).to have_content("Data Sharing Agreement") end it "shows data sharing agreement accepted" do