summaryrefslogtreecommitdiffstats
path: root/test/functional/versions_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-13 18:34:45 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-13 18:34:45 +0000
commitabf3fe9c83d8e0e832d4e4d211eafbeb27ea72b1 (patch)
tree880ebf98a661fbcf542d5acd4bb3ff1d71ed0152 /test/functional/versions_controller_test.rb
parent7e54597dcca1a795027a1d18faab7c9a71f970a6 (diff)
downloadredmine-abf3fe9c83d8e0e832d4e4d211eafbeb27ea72b1.tar.gz
redmine-abf3fe9c83d8e0e832d4e4d211eafbeb27ea72b1.zip
Adds a link to spent time on version details (#13558).
git-svn-id: http://svn.redmine.org/redmine/trunk@15648 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/versions_controller_test.rb')
-rw-r--r--test/functional/versions_controller_test.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb
index 185afe263..f44a4093a 100644
--- a/test/functional/versions_controller_test.rb
+++ b/test/functional/versions_controller_test.rb
@@ -20,7 +20,7 @@ require File.expand_path('../../test_helper', __FILE__)
class VersionsControllerTest < ActionController::TestCase
fixtures :projects, :versions, :issues, :users, :roles, :members,
:member_roles, :enabled_modules, :issue_statuses,
- :issue_categories
+ :issue_categories, :enumerations
def setup
User.current = nil
@@ -98,6 +98,18 @@ class VersionsControllerTest < ActionController::TestCase
assert_select 'h2', :text => /1.0/
end
+ def test_show_should_link_to_spent_time_on_version
+ version = Version.generate!
+ issue = Issue.generate(:fixed_version => version)
+ TimeEntry.generate!(:issue => issue, :hours => 7.2)
+
+ get :show, :id => version.id
+ assert_response :success
+
+ assert_select '.total-hours', :text => '7.20 hours'
+ assert_select '.total-hours a[href=?]', "/projects/ecookbook/time_entries?issue.fixed_version_id=#{version.id}&set_filter=1"
+ end
+
def test_show_should_display_nil_counts
with_settings :default_language => 'en' do
get :show, :id => 2, :status_by => 'category'