test/test_sanitize.rb in sanitize-2.0.5 vs test/test_sanitize.rb in sanitize-2.0.6

- old
+ new

@@ -588,36 +588,5 @@ it 'should not have Nokogiri 1.4.2+ unterminated script/style element bug' do Sanitize.clean!('foo <script>bar').must_equal('foo bar') Sanitize.clean!('foo <style>bar').must_equal('foo bar') end end - -describe "default configurations" do - def assert_deep_frozen(config) - if Hash === config - config.each_value { |c| assert_deep_frozen(c) } - config.frozen?.must_equal(true) - elsif Array === config - config.each { |c| assert_deep_frozen(c) } - config.frozen?.must_equal(true) - end - end - - { - "DEFAULT" => Sanitize::Config::DEFAULT, - "RESTRICTED" => Sanitize::Config::RESTRICTED, - "BASIC" => Sanitize::Config::BASIC, - "RELAXED" => Sanitize::Config::RELAXED, - }.each do |name, config| - describe name do - it "should be frozen" do - assert_deep_frozen(config) - end - end - end - - it "cannot be modified" do - assert_raises(RuntimeError, "can't modify frozen") { - Sanitize::Config::RESTRICTED.dup[:elements].push("script") - } - end -end