Defect #33059 » diff.patch
app/controllers/workflows_controller.rb | ||
---|---|---|
124 | 124 |
def find_roles |
125 | 125 |
ids = Array.wrap(params[:role_id]) |
126 | 126 |
if ids == ['all'] |
127 |
@roles = Role.sorted.to_a
|
|
127 |
@roles = Role.sorted.select(&:consider_workflow?)
|
|
128 | 128 |
elsif ids.present? |
129 | 129 |
@roles = Role.where(:id => ids).to_a |
130 | 130 |
end |
test/functional/workflows_controller_test.rb | ||
---|---|---|
97 | 97 |
get :edit, :params => {:role_id => 'all', :tracker_id => 'all'} |
98 | 98 |
assert_response :success |
99 | 99 | |
100 |
assert_select 'select[name=?][multiple=multiple]', 'role_id[]' do
|
|
101 |
assert_select 'option[selected=selected]', Role.all.count(&:consider_workflow?)
|
|
100 |
assert_select 'select[name=?]', 'role_id[]' do |
|
101 |
assert_select 'option[selected=selected][value=all]'
|
|
102 | 102 |
end |
103 | 103 |
assert_select 'select[name=?]', 'tracker_id[]' do |
104 | 104 |
assert_select 'option[selected=selected][value=all]' |