Sha256: e55a50b356c64661bcd0f45974c70d84dfbe652fe412d2bb5ba14c8ab4c33d13

Contents?: true

Size: 522 Bytes

Versions: 3

Compression:

Stored size: 522 Bytes

Contents

require "rails_helper"

RSpec.describe GovukDesignSystem::ErrorMessageHelper, type: :helper do
  describe "#govukErrorMessage" do
    it "returns the correct HTML for the default example" do
      html = helper.govukErrorMessage({
        text: "Rhowch eich enw llawn",
        visuallyHiddenText: "Gwall"
      })

      expect(html).to match_html(<<~HTML)
        <p class="govuk-error-message">
          <span class="govuk-visually-hidden">Gwall:</span> Rhowch eich enw llawn
        </p>
      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/error_message_helper_spec.rb
govuk-design-system-rails-0.10.2 spec/helpers/govuk_design_system/error_message_helper_spec.rb
govuk-design-system-rails-0.10.1 spec/helpers/govuk_design_system/error_message_helper_spec.rb