Sha256: 58361cfcd77d2f9854f37ae375c0b2ccab272f0457a4fff121fc0cd48cf111f8
Contents?: true
Size: 597 Bytes
Versions: 1
Compression:
Stored size: 597 Bytes
Contents
#!/usr/bin/env ruby # scrub.rb # String#scrub! unit tests require 'test/unit' require 'pathname' dir = Pathname.new(File.expand_path(__FILE__)).realpath require File.join(File.dirname(dir.to_s), '../lib/rex') class ScrubTests < Test::Unit::TestCase def test_xss expected = "alert('xss from yesmar');" actual = nil assert_nothing_raised do actual = "<script>alert('xss from yesmar');</script>" actual.scrub! end assert_not_nil(actual) assert_instance_of(String, actual) assert_equal(false, actual.empty?) assert_equal(expected, actual) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rex-0.0.4 | test/scrub.rb |