Sha256: d45091df7c3884376efc09f8e5b3a7a1368f5e40582baf99205e01c621f16e98

Contents?: true

Size: 546 Bytes

Versions: 3

Compression:

Stored size: 546 Bytes

Contents

require "rails_helper"

RSpec.describe GovukDesignSystem::LabelHelper, type: :helper do
  describe "#govukLabel" do
    it "returns the correct HTML for the default example" do
      html = helper.govukLabel({
        html: "<strong>test</strong>".html_safe,
        isPageHeading: true,
        for: "test"
      })

      expect(html).to match_html(<<~HTML)
        <h1 class="govuk-label-wrapper">
          <label class="govuk-label" for="test">
            <strong>test</strong>
          </label>
        </h1>
      HTML
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
govuk-design-system-rails-0.10.3 spec/helpers/govuk_design_system/label_helper_spec.rb
govuk-design-system-rails-0.10.2 spec/helpers/govuk_design_system/label_helper_spec.rb
govuk-design-system-rails-0.10.1 spec/helpers/govuk_design_system/label_helper_spec.rb