Sha256: 899ee979e868e9ee21b8bad5f38ae33a7abcceadd0681fe08b8b02c4b486d9ae

Contents?: true

Size: 505 Bytes

Versions: 14

Compression:

Stored size: 505 Bytes

Contents

require 'inline_svg/transform_pipeline'

describe InlineSvg::TransformPipeline::Transformations::AriaHiddenAttribute do
  it "adds an aria-hidden='true' attribute to a SVG document" do
    document = Nokogiri::XML::Document.parse('<svg>Some document</svg>')
    transformation = InlineSvg::TransformPipeline::Transformations::AriaHiddenAttribute.create_with_value(true)

    expect(transformation.transform(document).to_html).to eq(
      "<svg aria-hidden=\"true\">Some document</svg>\n"
    )
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
inline_svg-1.10.0 spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb
inline_svg-1.9.0 spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb
inline_svg-1.8.0 spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/inline_svg-1.7.2/spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb
inline_svg-1.7.2 spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb
inline_svg-1.7.1 spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb
inline_svg-1.7.0 spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb
inline_svg-1.6.0 spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb
inline_svg-1.5.2 spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb
inline_svg-1.5.1 spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb
inline_svg-1.5.0 spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb
inline_svg-1.4.0 spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb
inline_svg-1.3.1 spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb
inline_svg-1.3.0 spec/transformation_pipeline/transformations/aria_hidden_attribute_spec.rb