summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-04-05 16:10:16 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-04-05 16:10:16 +0000
commit73dc7256c60847c75438a149e4387e47c68453ee (patch)
tree3b4fcd676a6a08e8933fec04324eecf59e9b9435 /test/integration
parentfc73a90740f323c36e1e73bc97bda090237e8c30 (diff)
downloadredmine-73dc7256c60847c75438a149e4387e47c68453ee.tar.gz
redmine-73dc7256c60847c75438a149e4387e47c68453ee.zip
Adds a test for #25526.
git-svn-id: http://svn.redmine.org/redmine/trunk@16492 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/api_test/issues_test.rb9
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 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'