summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-04-01 02:16:03 +0000
committerGo MAEDA <maeda@farend.jp>2018-04-01 02:16:03 +0000
commited48b0708a7e0753b2e1f7916775069254c019b2 (patch)
treed8f3ddd86c706761a3c6415ae0b609d6991ebc9f /test/functional
parent02e1a17dd0fe4fbb788b9ff98dd1b2d81e897d47 (diff)
downloadredmine-ed48b0708a7e0753b2e1f7916775069254c019b2.tar.gz
redmine-ed48b0708a7e0753b2e1f7916775069254c019b2.zip
Add a test to ensure that issue calculations on version details page take into account only visible issues (#27676).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17251 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/versions_controller_test.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb
index bc189cb61..3d5af8dd3 100644
--- a/test/functional/versions_controller_test.rb
+++ b/test/functional/versions_controller_test.rb
@@ -101,6 +101,30 @@ class VersionsControllerTest < Redmine::ControllerTest
assert_select 'h2', :text => /1.0/
end
+ def test_show_issue_calculations_should_take_into_account_only_visible_issues
+ issue_9 = Issue.find(9)
+ issue_9.fixed_version_id = 4
+ issue_9.estimated_hours = 3
+ issue_9.save!
+
+ issue_13 = Issue.find(13)
+ issue_13.fixed_version_id = 4
+ issue_13.estimated_hours = 2
+ issue_13.save!
+
+ @request.session[:user_id] = 7
+
+ get :show, :params => {:id => 4}
+ assert_response :success
+
+ assert_select 'p.progress-info' do
+ assert_select 'a', :text => '1 issue'
+ assert_select 'a', :text => '1 open'
+ end
+
+ assert_select '.time-tracking td.total-hours a:first-child', :text => '2.00 hours'
+ end
+
def test_show_should_link_to_spent_time_on_version
version = Version.generate!
issue = Issue.generate(:fixed_version => version)