Don't include milliseconds in JSON API responses (#19354).

git-svn-id: http://svn.redmine.org/redmine/trunk@14101 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2015-03-15 09:49:35 +00:00
parent 50a8bd452b
commit 6c5e5142df
2 changed files with 25 additions and 4 deletions

View File

@@ -34,4 +34,14 @@ class Redmine::ApiTest::ApiTest < Redmine::ApiTest::Base
ensure
ActionController::Base.allow_forgery_protection = false
end
end
def test_json_datetime_format
get '/users/1.json', {}, credentials('admin')
assert_include '"created_on":"2006-07-19T17:12:21Z"', response.body
end
def test_xml_datetime_format
get '/users/1.xml', {}, credentials('admin')
assert_include '<created_on>2006-07-19T17:12:21Z</created_on>', response.body
end
end