@@ -8,15 +8,15 | |||
|
8 | 8 | <p> |
|
9 | 9 | <label><%= l(:label_tracker) %></label> |
|
10 | 10 | <%= select_tag('source_tracker_id', |
|
11 |
|
|
|
12 |
|
|
|
11 | content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '') + | |
|
12 | content_tag('option', "--- #{ l(:label_copy_same_as_target) } ---", :value => 'any') + | |
|
13 | 13 | options_from_collection_for_select(@trackers, 'id', 'name', @source_tracker && @source_tracker.id)) %> |
|
14 | 14 | </p> |
|
15 | 15 | <p> |
|
16 | 16 | <label><%= l(:label_role) %></label> |
|
17 | 17 | <%= select_tag('source_role_id', |
|
18 |
|
|
|
19 |
|
|
|
18 | content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '') + | |
|
19 | content_tag('option', "--- #{ l(:label_copy_same_as_target) } ---", :value => 'any') + | |
|
20 | 20 | options_from_collection_for_select(@roles, 'id', 'name', @source_role && @source_role.id)) %> |
|
21 | 21 | </p> |
|
22 | 22 | </fieldset> |
@@ -26,13 +26,13 | |||
|
26 | 26 | <p> |
|
27 | 27 | <label><%= l(:label_tracker) %></label> |
|
28 | 28 | <%= select_tag 'target_tracker_ids', |
|
29 |
|
|
|
29 | content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '', :disabled => true) + | |
|
30 | 30 | options_from_collection_for_select(@trackers, 'id', 'name', @target_trackers && @target_trackers.map(&:id)), :multiple => true %> |
|
31 | 31 | </p> |
|
32 | 32 | <p> |
|
33 | 33 | <label><%= l(:label_role) %></label> |
|
34 | 34 | <%= select_tag 'target_role_ids', |
|
35 |
|
|
|
35 | content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '', :disabled => true) + | |
|
36 | 36 | options_from_collection_for_select(@roles, 'id', 'name', @target_roles && @target_roles.map(&:id)), :multiple => true %> |
|
37 | 37 | </p> |
|
38 | 38 | </fieldset> |
@@ -142,6 +142,18 class WorkflowsControllerTest < ActionController::TestCase | |||
|
142 | 142 | get :copy |
|
143 | 143 | assert_response :success |
|
144 | 144 | assert_template 'copy' |
|
145 | assert_select 'select[name=source_tracker_id]' do | |
|
146 | assert_select 'option[value=1]', :text => 'Bug' | |
|
147 | end | |
|
148 | assert_select 'select[name=source_role_id]' do | |
|
149 | assert_select 'option[value=2]', :text => 'Developer' | |
|
150 | end | |
|
151 | assert_select 'select[name=?]', 'target_tracker_ids[]' do | |
|
152 | assert_select 'option[value=3]', :text => 'Support request' | |
|
153 | end | |
|
154 | assert_select 'select[name=?]', 'target_role_ids[]' do | |
|
155 | assert_select 'option[value=1]', :text => 'Manager' | |
|
156 | end | |
|
145 | 157 | end |
|
146 | 158 | |
|
147 | 159 | def test_post_copy_one_to_one |
General Comments 0
You need to be logged in to leave comments.
Login now