diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-04-05 16:12:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-04-05 16:12:51 +0000 |
commit | c66898259c9ca765a9435142dc79535bf534b159 (patch) | |
tree | 9178cd117ba87c66d8527775b1df1c1f48242ea4 | |
parent | 9b2f70f4f12e2c3b028bddae7392adc4cf5d1a8e (diff) | |
download | redmine-c66898259c9ca765a9435142dc79535bf534b159.tar.gz redmine-c66898259c9ca765a9435142dc79535bf534b159.zip |
Merged r16492 (#25526).
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@16496 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/integration/api_test/issues_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb index 837982ec8..58f5b0a85 100644 --- a/test/integration/api_test/issues_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -316,6 +316,15 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base assert_equal 1, json['issue']['children'].select {|child| child.key?('children')}.size end + test "GET /issues/:id.json with no spent time should return floats" do + issue = Issue.generate! + get "/issues/#{issue.id}.json" + + json = ActiveSupport::JSON.decode(response.body) + assert_kind_of Float, json['issue']['spent_hours'] + assert_kind_of Float, json['issue']['total_spent_hours'] + end + def test_show_should_include_issue_attributes get '/issues/1.xml' assert_select 'issue>is_private', :text => 'false' |