diff --git a/spec/lucky/text_helpers/svg_inliner_spec.cr b/spec/lucky/text_helpers/svg_inliner_spec.cr index 13d110b15..5addfb7d8 100644 --- a/spec/lucky/text_helpers/svg_inliner_spec.cr +++ b/spec/lucky/text_helpers/svg_inliner_spec.cr @@ -12,6 +12,18 @@ class TextHelperTestPage def with_inlined_and_styled_svg inline_svg("lucky_logo.svg", false) end + + def with_additional_attributes + inline_svg("lucky_logo.svg", data_very: "lucky") + end + + def with_original_styles_and_additional_attributes + inline_svg("lucky_logo.svg", strip_styling: false, data_very: "lucky") + end + + def without_file_extension + inline_svg("lucky_logo") + end end describe Lucky::SvgInliner do @@ -45,10 +57,26 @@ describe Lucky::SvgInliner do inlined_svg.should_not contain %(fill="none" stroke="#2a2a2a" class="logo") end - it "allows inlinging an svg without stripping its styling attributes" do + it "allows inlining an svg without stripping its styling attributes" do inlined_svg = view.tap(&.with_inlined_and_styled_svg).render inlined_svg.should start_with %(