From c66898259c9ca765a9435142dc79535bf534b159 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 5 Apr 2017 16:12:51 +0000 Subject: [PATCH] Merged r16492 (#25526). git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@16496 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/api_test/issues_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) 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' -- 2.39.5