@@ -87,7 +87,7 class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase | |||||
87 | end |
|
87 | end | |
88 |
|
88 | |||
89 | def assert_json_output(expected, &block) |
|
89 | def assert_json_output(expected, &block) | |
90 | builder = Redmine::Views::Builders::Json.new |
|
90 | builder = Redmine::Views::Builders::Json.new(ActionDispatch::TestRequest.new, ActionDispatch::TestResponse.new) | |
91 | block.call(builder) |
|
91 | block.call(builder) | |
92 | assert_equal(expected, ActiveSupport::JSON.decode(builder.output)) |
|
92 | assert_equal(expected, ActiveSupport::JSON.decode(builder.output)) | |
93 | end |
|
93 | end |
@@ -60,7 +60,7 class Redmine::Views::Builders::XmlTest < ActiveSupport::TestCase | |||||
60 | end |
|
60 | end | |
61 |
|
61 | |||
62 | def assert_xml_output(expected, &block) |
|
62 | def assert_xml_output(expected, &block) | |
63 | builder = Redmine::Views::Builders::Xml.new |
|
63 | builder = Redmine::Views::Builders::Xml.new(ActionDispatch::TestRequest.new, ActionDispatch::TestResponse.new) | |
64 | block.call(builder) |
|
64 | block.call(builder) | |
65 | assert_equal('<?xml version="1.0" encoding="UTF-8"?>' + expected, builder.output) |
|
65 | assert_equal('<?xml version="1.0" encoding="UTF-8"?>' + expected, builder.output) | |
66 | end |
|
66 | end |
General Comments 0
You need to be logged in to leave comments.
Login now