Sha256: 74de119ab8f32d18947da0a714834936c762c8ea23293d74b29c30fa85f633b2

Contents?: true

Size: 403 Bytes

Versions: 2

Compression:

Stored size: 403 Bytes

Contents

require 'abstract_unit'

class OutputEscapingTest < ActiveSupport::TestCase

  test "escape_html shouldn't die when passed nil" do
    assert ERB::Util.h(nil).blank?
  end

  test "escapeHTML should escape strings" do
    assert_equal "&lt;&gt;&quot;", ERB::Util.h("<>\"")
  end

  test "escapeHTML shouldn't touch explicitly safe strings" do
    assert_equal "<", ERB::Util.h("<".html_safe)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activejob-lock-0.0.2 rails/actionpack/test/controller/output_escaping_test.rb
activejob-lock-0.0.1 rails/actionpack/test/controller/output_escaping_test.rb