class TestWabisabiValid

Public Instance Methods

ok(e, w) click to toggle source
# File vendor/qwik/lib/qwik/wabisabi-validator.rb, line 101
def ok(e, w)
  assert_equal e, WabisabiValidator.valid?(w)
end
test_valid() click to toggle source
# File vendor/qwik/lib/qwik/wabisabi-validator.rb, line 105
def test_valid
  ok true, [:p, 't']
  ok true, [:ul, 't']
  ok :script, [:script, 't']
  ok true, [:img, {:src=>'s', :alt=>'a'}, 't']
  ok :onload, [:img, {:onload=>'o'}, 't']
  ok 'Invalid URL', [:img, {:src=>'javascript:do something'}]
  ok true, [:img, {:src=>'http://example.net/a.jpg'}]
  ok true, [:img, {:src=>'https://example.net/a.jpg'}]
end