diff options
Diffstat (limited to 'actionview/test/template/javascript_helper_test.rb')
-rw-r--r-- | actionview/test/template/javascript_helper_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionview/test/template/javascript_helper_test.rb b/actionview/test/template/javascript_helper_test.rb index 0468c845d2..c7670b056b 100644 --- a/actionview/test/template/javascript_helper_test.rb +++ b/actionview/test/template/javascript_helper_test.rb @@ -7,7 +7,7 @@ class JavaScriptHelperTest < ActionView::TestCase setup do @old_escape_html_entities_in_json = ActiveSupport.escape_html_entities_in_json - ActiveSupport.escape_html_entities_in_json = true + ActiveSupport.escape_html_entities_in_json = true @template = self end @@ -18,7 +18,7 @@ class JavaScriptHelperTest < ActionView::TestCase def test_escape_javascript assert_equal "", escape_javascript(nil) assert_equal %(This \\"thing\\" is really\\n netos\\'), escape_javascript(%(This "thing" is really\n netos')) - assert_equal %(backslash\\\\test), escape_javascript( %(backslash\\test) ) + assert_equal %(backslash\\\\test), escape_javascript(%(backslash\\test)) assert_equal %(dont <\\/close> tags), escape_javascript(%(dont </close> tags)) assert_equal %(unicode 
 newline), escape_javascript(%(unicode \342\200\250 newline).force_encoding(Encoding::UTF_8).encode!) assert_equal %(unicode 
 newline), escape_javascript(%(unicode \342\200\251 newline).force_encoding(Encoding::UTF_8).encode!) @@ -47,8 +47,8 @@ class JavaScriptHelperTest < ActionView::TestCase # Setting the :extname option will control what extension (if any) is appended to the url for assets def test_javascript_include_tag assert_dom_equal "<script src='/foo.js'></script>", javascript_include_tag("/foo") - assert_dom_equal "<script src='/foo'></script>", javascript_include_tag("/foo", extname: false ) - assert_dom_equal "<script src='/foo.bar'></script>", javascript_include_tag("/foo", extname: ".bar" ) + assert_dom_equal "<script src='/foo'></script>", javascript_include_tag("/foo", extname: false) + assert_dom_equal "<script src='/foo.bar'></script>", javascript_include_tag("/foo", extname: ".bar") end def test_javascript_tag_with_options |