|
|
|
@ -22,7 +22,7 @@ RSpec.describe TabNavHelper do |
|
|
|
|
|
|
|
|
|
|
|
describe "#location_cell" do |
|
|
|
describe "#location_cell" do |
|
|
|
it "returns the location link to the postcode with optional name" do |
|
|
|
it "returns the location link to the postcode with optional name" do |
|
|
|
expected_html = "<a class=\"govuk-link\" href=\"/schemes/#{location.id}/location?scheme_id=#{scheme.id}\">#{location.postcode}</a>\n<span class=\"govuk-visually-hidden\">Location </span><span class=\"govuk-!-font-weight-regular app-!-colour-muted\">#{location.name}</span>" |
|
|
|
expected_html = "<a class=\"govuk-link\" rel=\"nofollow\" data-method=\"patch\" href=\"/schemes/#{scheme.id}/locations/#{location.id}/edit\">#{location.postcode}</a>\n<span class=\"govuk-visually-hidden\">Location </span><span class=\"govuk-!-font-weight-regular app-!-colour-muted\">#{location.name}</span>" |
|
|
|
expect(location_cell(location)).to match(expected_html) |
|
|
|
expect(location_cell(location)).to match(expected_html) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|