@@ -22,7 +22,8 | |||
|
22 | 22 | <% if User.current.allowed_to_view_all_time_entries?(@project) %> |
|
23 | 23 | <tr> |
|
24 | 24 | <th><%= l(:label_spent_time) %></th> |
|
25 |
<td class="total-hours"><%= html_hours(l_hours(@version.spent_hours)) |
|
|
25 | <td class="total-hours"><%= link_to html_hours(l_hours(@version.spent_hours)), | |
|
26 | project_time_entries_path(@version.project, :set_filter => 1, :"issue.fixed_version_id" => @version.id) %></td> | |
|
26 | 27 | </tr> |
|
27 | 28 | <% end %> |
|
28 | 29 | </table> |
@@ -20,7 +20,7 require File.expand_path('../../test_helper', __FILE__) | |||
|
20 | 20 | class VersionsControllerTest < ActionController::TestCase |
|
21 | 21 | fixtures :projects, :versions, :issues, :users, :roles, :members, |
|
22 | 22 | :member_roles, :enabled_modules, :issue_statuses, |
|
23 | :issue_categories | |
|
23 | :issue_categories, :enumerations | |
|
24 | 24 | |
|
25 | 25 | def setup |
|
26 | 26 | User.current = nil |
@@ -98,6 +98,18 class VersionsControllerTest < ActionController::TestCase | |||
|
98 | 98 | assert_select 'h2', :text => /1.0/ |
|
99 | 99 | end |
|
100 | 100 | |
|
101 | def test_show_should_link_to_spent_time_on_version | |
|
102 | version = Version.generate! | |
|
103 | issue = Issue.generate(:fixed_version => version) | |
|
104 | TimeEntry.generate!(:issue => issue, :hours => 7.2) | |
|
105 | ||
|
106 | get :show, :id => version.id | |
|
107 | assert_response :success | |
|
108 | ||
|
109 | assert_select '.total-hours', :text => '7.20 hours' | |
|
110 | assert_select '.total-hours a[href=?]', "/projects/ecookbook/time_entries?issue.fixed_version_id=#{version.id}&set_filter=1" | |
|
111 | end | |
|
112 | ||
|
101 | 113 | def test_show_should_display_nil_counts |
|
102 | 114 | with_settings :default_language => 'en' do |
|
103 | 115 | get :show, :id => 2, :status_by => 'category' |
General Comments 0
You need to be logged in to leave comments.
Login now