@@ -8,15 +8,15 | |||||
8 | <p> |
|
8 | <p> | |
9 | <label><%= l(:label_tracker) %></label> |
|
9 | <label><%= l(:label_tracker) %></label> | |
10 | <%= select_tag('source_tracker_id', |
|
10 | <%= select_tag('source_tracker_id', | |
11 |
|
|
11 | content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '') + | |
12 |
|
|
12 | content_tag('option', "--- #{ l(:label_copy_same_as_target) } ---", :value => 'any') + | |
13 | options_from_collection_for_select(@trackers, 'id', 'name', @source_tracker && @source_tracker.id)) %> |
|
13 | options_from_collection_for_select(@trackers, 'id', 'name', @source_tracker && @source_tracker.id)) %> | |
14 | </p> |
|
14 | </p> | |
15 | <p> |
|
15 | <p> | |
16 | <label><%= l(:label_role) %></label> |
|
16 | <label><%= l(:label_role) %></label> | |
17 | <%= select_tag('source_role_id', |
|
17 | <%= select_tag('source_role_id', | |
18 |
|
|
18 | content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '') + | |
19 |
|
|
19 | content_tag('option', "--- #{ l(:label_copy_same_as_target) } ---", :value => 'any') + | |
20 | options_from_collection_for_select(@roles, 'id', 'name', @source_role && @source_role.id)) %> |
|
20 | options_from_collection_for_select(@roles, 'id', 'name', @source_role && @source_role.id)) %> | |
21 | </p> |
|
21 | </p> | |
22 | </fieldset> |
|
22 | </fieldset> | |
@@ -26,13 +26,13 | |||||
26 | <p> |
|
26 | <p> | |
27 | <label><%= l(:label_tracker) %></label> |
|
27 | <label><%= l(:label_tracker) %></label> | |
28 | <%= select_tag 'target_tracker_ids', |
|
28 | <%= select_tag 'target_tracker_ids', | |
29 |
|
|
29 | content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '', :disabled => true) + | |
30 | options_from_collection_for_select(@trackers, 'id', 'name', @target_trackers && @target_trackers.map(&:id)), :multiple => true %> |
|
30 | options_from_collection_for_select(@trackers, 'id', 'name', @target_trackers && @target_trackers.map(&:id)), :multiple => true %> | |
31 | </p> |
|
31 | </p> | |
32 | <p> |
|
32 | <p> | |
33 | <label><%= l(:label_role) %></label> |
|
33 | <label><%= l(:label_role) %></label> | |
34 | <%= select_tag 'target_role_ids', |
|
34 | <%= select_tag 'target_role_ids', | |
35 |
|
|
35 | content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '', :disabled => true) + | |
36 | options_from_collection_for_select(@roles, 'id', 'name', @target_roles && @target_roles.map(&:id)), :multiple => true %> |
|
36 | options_from_collection_for_select(@roles, 'id', 'name', @target_roles && @target_roles.map(&:id)), :multiple => true %> | |
37 | </p> |
|
37 | </p> | |
38 | </fieldset> |
|
38 | </fieldset> |
@@ -142,6 +142,18 class WorkflowsControllerTest < ActionController::TestCase | |||||
142 | get :copy |
|
142 | get :copy | |
143 | assert_response :success |
|
143 | assert_response :success | |
144 | assert_template 'copy' |
|
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 | end |
|
157 | end | |
146 |
|
158 | |||
147 | def test_post_copy_one_to_one |
|
159 | def test_post_copy_one_to_one |
General Comments 0
You need to be logged in to leave comments.
Login now