From 73dc7256c60847c75438a149e4387e47c68453ee Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 5 Apr 2017 16:10:16 +0000 Subject: [PATCH] Adds a test for #25526. git-svn-id: http://svn.redmine.org/redmine/trunk@16492 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 f62f83258..81f62ea2d 100644 --- a/test/integration/api_test/issues_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -336,6 +336,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'