提交 534e1e1f 编写于 作者: Y Yves Senn

Merge pull request #15712 from zuhao/refactor_actionview_javascript_helper_test

Avoid hard-coded value in test setup and teardown.
...@@ -12,14 +12,14 @@ def update_details(details) ...@@ -12,14 +12,14 @@ def update_details(details)
yield if block_given? yield if block_given?
end end
def setup setup do
super @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 @template = self
end end
def teardown def teardown
ActiveSupport.escape_html_entities_in_json = false ActiveSupport.escape_html_entities_in_json = @old_escape_html_entities_in_json
end end
def test_escape_javascript def test_escape_javascript
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册