# frozen_string_literal: true require_relative "common" describe "Sanitize::Transformers::CSS::CleanAttribute" do make_my_diffs_pretty! parallelize_me! before do @s = Sanitize.new(Sanitize::Config::RELAXED) end it "should sanitize CSS properties in style attributes" do _(@s.fragment(%[
].strip)).must_equal %( ).strip end it "should remove the style attribute if the sanitized CSS is empty" do _(@s.fragment('')) .must_equal "" end end describe "Sanitize::Transformers::CSS::CleanElement" do make_my_diffs_pretty! parallelize_me! before do @s = Sanitize.new(Sanitize::Config::RELAXED) end it "should sanitize CSS stylesheets in ].strip _(@s.fragment(html)).must_equal %[ ].strip end it "should remove the ")).must_equal "" end end