require "rails_helper" RSpec.describe GovukDesignSystem::InsetTextHelper, type: :helper do describe "#govukInsetText" do it "returns the correct HTML for the default example" do html = helper.govukInsetText({ text: "It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application." }) expect(html).to match_html(<<~HTML)
It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application.
HTML end it "returns the correct HTML for an example using html" do inset_html = <<~HTML.html_safe

Creating a case starts from a product record page.

Find a product and create the case from there.

How to create a case
HTML html = helper.govukInsetText({ classes: "govuk-!-margin-bottom-7", html: inset_html }) expect(html).to match_html(<<~HTML)

Creating a case starts from a product record page.

Find a product and create the case from there.

How to create a case
HTML end end end