Browse Source

PR comments

pull/150/head
baarkerlounger 4 years ago
parent
commit
0cd57afd25
  1. 2
      app/models/organisation.rb
  2. 2
      app/views/organisations/edit.html.erb
  3. 2
      spec/requests/organisations_controller_spec.rb

2
app/models/organisation.rb

@ -31,7 +31,7 @@ class Organisation < ApplicationRecord
{ name: "local_authorities_operated_in", value: local_authorities, editable: false }, { name: "local_authorities_operated_in", value: local_authorities, editable: false },
{ name: "holds_own_stock", value: holds_own_stock, editable: false }, { name: "holds_own_stock", value: holds_own_stock, editable: false },
{ name: "other_stock_owners", value: other_stock_owners, editable: false }, { name: "other_stock_owners", value: other_stock_owners, editable: false },
{ name: "managing_agents", value: managing_agents, editable: false } { name: "managing_agents", value: managing_agents, editable: false },
] ]
end end
end end

2
app/views/organisations/edit.html.erb

@ -19,10 +19,12 @@
%> %>
<%= f.govuk_text_field :address_line1, <%= f.govuk_text_field :address_line1,
label: -> { safe_join(["Building and street", " ", tag.span("line 1 of 2", class: "govuk-visually-hidden")]) },
autocomplete: "address-line1" autocomplete: "address-line1"
%> %>
<%= f.govuk_text_field :address_line2, <%= f.govuk_text_field :address_line2,
label: { text: "Building and street line 2 of 2", hidden: true },
autocomplete: "address-line2" autocomplete: "address-line2"
%> %>

2
spec/requests/organisations_controller_spec.rb

@ -143,7 +143,7 @@ RSpec.describe OrganisationsController, type: :request do
end end
it "shows an edit form" do it "shows an edit form" do
expect(response.body).to include("Change #{organisation.name}&#39;s details") expect(response.body).to include("Change #{organisation.name}s details")
expect(page).to have_field("organisation-name-field") expect(page).to have_field("organisation-name-field")
expect(page).to have_field("organisation-phone-field") expect(page).to have_field("organisation-phone-field")
end end

Loading…
Cancel
Save