summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-03-15 09:49:35 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-03-15 09:49:35 +0000
commit6c5e5142dffd2a8161f5c6a8a81d2e5b7276acae (patch)
tree388801369bab6436f492ad9bb08e2c63becc4a46 /test/integration
parent50a8bd452bfdf914a3986cbc1336469287724c6f (diff)
downloadredmine-6c5e5142dffd2a8161f5c6a8a81d2e5b7276acae.tar.gz
redmine-6c5e5142dffd2a8161f5c6a8a81d2e5b7276acae.zip
Don't include milliseconds in JSON API responses (#19354).
git-svn-id: http://svn.redmine.org/redmine/trunk@14101 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/api_test/api_test.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/integration/api_test/api_test.rb b/test/integration/api_test/api_test.rb
index 1387fa905..b81f8e0ad 100644
--- a/test/integration/api_test/api_test.rb
+++ b/test/integration/api_test/api_test.rb
@@ -34,4 +34,14 @@ class Redmine::ApiTest::ApiTest < Redmine::ApiTest::Base
ensure
ActionController::Base.allow_forgery_protection = false
end
-end \ No newline at end of file
+
+ 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