Defect #5593 » tests_for_5593.patch
| test/functional/workflows_controller_test.rb | ||
|---|---|---|
|
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
|
||