diff options
-rw-r--r-- | app/controllers/workflows_controller.rb | 2 | ||||
-rw-r--r-- | test/functional/workflows_controller_test.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index de4f59a13..0c29b14a1 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -120,7 +120,7 @@ class WorkflowsController < ApplicationController def find_roles ids = Array.wrap(params[:role_id]) if ids == ['all'] - @roles = Role.sorted.to_a + @roles = Role.sorted.select(&:consider_workflow?) elsif ids.present? @roles = Role.where(:id => ids).to_a end diff --git a/test/functional/workflows_controller_test.rb b/test/functional/workflows_controller_test.rb index 51b3ec5d0..e1759ea03 100644 --- a/test/functional/workflows_controller_test.rb +++ b/test/functional/workflows_controller_test.rb @@ -97,8 +97,8 @@ class WorkflowsControllerTest < Redmine::ControllerTest get :edit, :params => {:role_id => 'all', :tracker_id => 'all'} assert_response :success - assert_select 'select[name=?][multiple=multiple]', 'role_id[]' do - assert_select 'option[selected=selected]', Role.all.count(&:consider_workflow?) + assert_select 'select[name=?]', 'role_id[]' do + assert_select 'option[selected=selected][value=all]' end assert_select 'select[name=?]', 'tracker_id[]' do assert_select 'option[selected=selected][value=all]' |