ApiTest fails if config.time_zone is set (#31388).

Patch by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@18237 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2019-06-08 06:44:20 +00:00
parent a12a6f6c3e
commit 299f7a40b7
2 changed files with 6 additions and 6 deletions

View File

@@ -40,12 +40,12 @@ class Redmine::ApiTest::ApiTest < Redmine::ApiTest::Base
def test_json_datetime_format
get '/users/1.json', :headers => credentials('admin')
assert_include '"created_on":"2006-07-19T17:12:21Z"', response.body
assert_include %Q|"created_on":"#{Time.zone.parse('2006-07-19T17:12:21Z').iso8601}"|, response.body
end
def test_xml_datetime_format
get '/users/1.xml', :headers => credentials('admin')
assert_include '<created_on>2006-07-19T17:12:21Z</created_on>', response.body
assert_include "<created_on>#{Time.zone.parse('2006-07-19T17:12:21Z').iso8601}</created_on>", response.body
end
def test_head_response_should_have_empty_body