summaryrefslogtreecommitdiffstats
path: root/test/integration/api_test
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/api_test')
-rw-r--r--test/integration/api_test/issues_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb
index 94f42287a..de0a2fd20 100644
--- a/test/integration/api_test/issues_test.rb
+++ b/test/integration/api_test/issues_test.rb
@@ -356,6 +356,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base
test "GET /issues/:id.xml should contains total_estimated_hours and total_spent_hours" do
parent = Issue.find(3)
+ parent.update_columns :estimated_hours => 2.0
child = Issue.generate!(:parent_issue_id => parent.id, :estimated_hours => 3.0)
TimeEntry.create!(:project => child.project, :issue => child, :user => child.author, :spent_on => child.author.today,
:hours => '2.5', :comments => '', :activity_id => TimeEntryActivity.first.id)
@@ -372,6 +373,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base
test "GET /issues/:id.xml should contains total_estimated_hours, and should not contains spent_hours and total_spent_hours when permission does not exists" do
parent = Issue.find(3)
+ parent.update_columns :estimated_hours => 2.0
child = Issue.generate!(:parent_issue_id => parent.id, :estimated_hours => 3.0)
# remove permission!
Role.anonymous.remove_permission! :view_time_entries
@@ -389,6 +391,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base
test "GET /issues/:id.json should contains total_estimated_hours and total_spent_hours" do
parent = Issue.find(3)
+ parent.update_columns :estimated_hours => 2.0
child = Issue.generate!(:parent_issue_id => parent.id, :estimated_hours => 3.0)
TimeEntry.create!(:project => child.project, :issue => child, :user => child.author, :spent_on => child.author.today,
:hours => '2.5', :comments => '', :activity_id => TimeEntryActivity.first.id)
@@ -404,6 +407,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base
test "GET /issues/:id.json should contains total_estimated_hours, and should not contains spent_hours and total_spent_hours when permission does not exists" do
parent = Issue.find(3)
+ parent.update_columns :estimated_hours => 2.0
child = Issue.generate!(:parent_issue_id => parent.id, :estimated_hours => 3.0)
# remove permission!
Role.anonymous.remove_permission! :view_time_entries