Defect #37685 » test_global_new_issue_and_hierarchy_projects_new_issue.patch
test/functional/issues_controller_test.rb (revision 1297b79bd0699bdecefa22ac0b38ec9198b6b7b9) → test/functional/issues_controller_test.rb (date 1663685518967) | ||
---|---|---|
5586 | 5586 |
assert_select 'select[name=?]', 'issue[project_id]', 0 |
5587 | 5587 |
end |
5588 | 5588 | |
5589 |
def test_new_should_hide_project_if_user_is_not_allowed_to_change_project_in_hierarchy_projects |
|
5590 |
WorkflowPermission.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 1, |
|
5591 |
:field_name => 'project_id', :rule => 'readonly') |
|
5592 | ||
5593 |
@request.session[:user_id] = 2 |
|
5594 |
get(:new, :params => { :tracker_id => 1, :project_id => 1 }) |
|
5595 |
assert_response :success |
|
5596 |
assert_select 'select[name=?]', 'issue[project_id]', 0 |
|
5597 |
end |
|
5598 | ||
5599 |
def test_new_should_show_project_if_user_is_not_allowed_to_change_project_global_new_issue |
|
5600 |
WorkflowPermission.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 1, |
|
5601 |
:field_name => 'project_id', :rule => 'readonly') |
|
5602 | ||
5603 |
@request.session[:user_id] = 2 |
|
5604 |
get(:new, :params => { :tracker_id => 1}) |
|
5605 |
assert_response :success |
|
5606 |
assert_select 'select[name=?]', 'issue[project_id]' |
|
5607 |
end |
|
5608 | ||
5589 | 5609 |
def test_edit_should_not_hide_project_when_user_changes_the_project_even_if_project_is_readonly_on_target_project |
5590 | 5610 |
WorkflowPermission.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 1, |
5591 | 5611 |
:field_name => 'project_id', :rule => 'readonly') |
- « Previous
- 1
- 2
- 3
- Next »