Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / test / unit / helpers / javascript_helper_test.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 require 'test_helper'
6
7 # Tests XSS vulnerability monkeypatch
8 # See: https://github.com/advisories/GHSA-65cv-r6x7-79hv
9 class JavascriptHelperTest < ActionView::TestCase
10   def test_escape_backtick
11     assert_equal "\\`", escape_javascript("`")
12   end
13
14   def test_escape_dollar_sign
15     assert_equal "\\$", escape_javascript("$")
16   end
17 end