Defect #19187 » test_show_issue_calculations_should_take_into_account_only_visible_issues.patch
| test/functional/versions_controller_test.rb | ||
|---|---|---|
| 101 | 101 |
assert_select 'h2', :text => /1.0/ |
| 102 | 102 |
end |
| 103 | 103 | |
| 104 |
def test_show_issue_calculations_should_take_into_account_only_visible_issues |
|
| 105 |
issue_9 = Issue.find(9) |
|
| 106 |
issue_9.fixed_version_id = 4 |
|
| 107 |
issue_9.estimated_hours = 3 |
|
| 108 |
issue_9.save! |
|
| 109 |
|
|
| 110 |
issue_13 = Issue.find(13) |
|
| 111 |
issue_13.fixed_version_id = 4 |
|
| 112 |
issue_13.estimated_hours = 2 |
|
| 113 |
issue_13.save! |
|
| 114 |
|
|
| 115 |
@request.session[:user_id] = 7 |
|
| 116 | ||
| 117 |
get :show, :params => {:id => 4}
|
|
| 118 |
assert_response :success |
|
| 119 | ||
| 120 |
assert_select 'p.progress-info' do |
|
| 121 |
assert_select 'a', :text => '1 issue' |
|
| 122 |
assert_select 'a', :text => '1 open' |
|
| 123 |
end |
|
| 124 | ||
| 125 |
assert_select '.time-tracking td.total-hours a:first-child', :text => '2.00 hours' |
|
| 126 |
end |
|
| 127 | ||
| 104 | 128 |
def test_show_should_link_to_spent_time_on_version |
| 105 | 129 |
version = Version.generate! |
| 106 | 130 |
issue = Issue.generate(:fixed_version => version) |