diff --git a/test/functional/workflows_controller_test.rb b/test/functional/workflows_controller_test.rb index e1a58c3..8febab5 100644 --- a/test/functional/workflows_controller_test.rb +++ b/test/functional/workflows_controller_test.rb @@ -110,7 +110,20 @@ class WorkflowsControllerTest < Redmine::ControllerTest assert_equal ["New issue"] + statuses, css_select('table.workflows.transitions-always tbody tr td:first').map(&:text).map(&:strip) - assert_select 'input[type=checkbox][name=?]', 'transitions[1][1][always]' + assert_select 'input[type=checkbox][name=?]', 'transitions[0][1][always]' + end + + def test_get_edit_should_not_show_checkboxes_for_transitions_between_the_same_statuses + get :edit, :params => {:role_id => 2, :tracker_id => 1} + assert_response :success + + assert_select 'table.workflows.transitions-always tbody tr:nth-child(2)' do + assert_select 'td.name', :text => 'New' + # assert that "-" is shown instead of a checkbox + assert_select 'td[title=?]', 'New ยป New', :text => '-' + assert_select 'input[name=?]', 'transitions[1][1][always]', 0 + assert_select 'input[name=?]', 'transitions[2][2][always]', 0 + end end def test_post_edit