|
|
@@ -5658,6 +5658,41 @@ class IssuesControllerTest < Redmine::ControllerTest |
|
|
|
assert_select 'span.icon-warning[title=?]', reason, :text => reason |
|
|
|
end |
|
|
|
|
|
|
|
def test_get_edit_should_display_visible_spent_time_custom_field |
|
|
|
@request.session[:user_id] = 2 |
|
|
|
|
|
|
|
get( |
|
|
|
:edit, |
|
|
|
:params => { |
|
|
|
:id => 13, |
|
|
|
} |
|
|
|
) |
|
|
|
|
|
|
|
assert_response :success |
|
|
|
|
|
|
|
assert_select '#issue-form select.cf_10', 1 |
|
|
|
end |
|
|
|
|
|
|
|
def test_get_edit_should_not_display_spent_time_custom_field_not_visible |
|
|
|
cf = TimeEntryCustomField.find(10) |
|
|
|
cf.visible = false |
|
|
|
cf.role_ids = [1] |
|
|
|
cf.save! |
|
|
|
|
|
|
|
@request.session[:user_id] = 2 |
|
|
|
|
|
|
|
get( |
|
|
|
:edit, |
|
|
|
:params => { |
|
|
|
:id => 13, |
|
|
|
} |
|
|
|
) |
|
|
|
|
|
|
|
assert_response :success |
|
|
|
|
|
|
|
assert_select '#issue-form select.cf_10', 0 |
|
|
|
end |
|
|
|
|
|
|
|
def test_update_form_for_existing_issue |
|
|
|
@request.session[:user_id] = 2 |
|
|
|
patch( |