]> source.dussan.org Git - redmine.git/commitdiff
Merged r16492 (#25526).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 5 Apr 2017 16:12:45 +0000 (16:12 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 5 Apr 2017 16:12:45 +0000 (16:12 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@16495 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/integration/api_test/issues_test.rb

index 45ec9c1262f7777d6fb71f86fd712bed1f650e0d..119dfd4ff7349d93b98203ce5db4eb93b5f3c48d 100644 (file)
@@ -323,6 +323,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'