提交 0da1c80a 编写于 作者: Z Zuhao Wan

Avoid hard-coded value in test setup and teardown.

上级 ee4e86fa
......@@ -12,14 +12,14 @@ def update_details(details)
yield if block_given?
end
def setup
super
setup do
@old_escape_html_entities_in_json = ActiveSupport.escape_html_entities_in_json
ActiveSupport.escape_html_entities_in_json = true
@template = self
end
def teardown
ActiveSupport.escape_html_entities_in_json = false
ActiveSupport.escape_html_entities_in_json = @old_escape_html_entities_in_json
end
def test_escape_javascript
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册