Browse Source

more tests fixed - part 3

pull/781/head
JG 3 years ago
parent
commit
bf069b9574
  1. 4
      spec/helpers/tab_nav_helper_spec.rb

4
spec/helpers/tab_nav_helper_spec.rb

@ -1,5 +1,7 @@
require "rails_helper"
using RefinementTest
RSpec.describe TabNavHelper do
let(:organisation) { FactoryBot.create(:organisation) }
let(:user) { FactoryBot.build(:user, organisation:) }
@ -23,7 +25,7 @@ RSpec.describe TabNavHelper do
describe "#location_cell" do
it "returns the location link to the postcode with optional name" do
link = "/schemes/#{location.scheme.id}/locations/#{location.id}/edit"
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>"
expected_html = "<a class=\"govuk-link\" rel=\"nofollow\" data-method=\"patch\" href=\"/schemes/#{scheme.id}/locations/#{location.id}/edit\">#{location.postcode.formatted_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, link)).to match(expected_html)
end
end

Loading…
Cancel
Save