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
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.select(&:consider_workflow?).count
+ 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]'