diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-11 20:38:26 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-11 20:38:26 +0000 |
commit | 24be0551ccd77c7facf0278825973d604942d88a (patch) | |
tree | e74ef651f120edfb72d83e623b7eb42a576e2116 /test/functional/workflows_controller_test.rb | |
parent | 5dd7467061fbe6b649a6bf92f969184e41bc8908 (diff) | |
download | redmine-24be0551ccd77c7facf0278825973d604942d88a.tar.gz redmine-24be0551ccd77c7facf0278825973d604942d88a.zip |
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10987 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/workflows_controller_test.rb')
-rw-r--r-- | test/functional/workflows_controller_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/workflows_controller_test.rb b/test/functional/workflows_controller_test.rb index c4170ff52..af4ff6ef4 100644 --- a/test/functional/workflows_controller_test.rb +++ b/test/functional/workflows_controller_test.rb @@ -297,6 +297,26 @@ class WorkflowsControllerTest < ActionController::TestCase assert_equal source_t3, status_transitions(:tracker_id => 3, :role_id => 3) end + def test_post_copy_with_incomplete_source_specification_should_fail + assert_no_difference 'WorkflowRule.count' do + post :copy, + :source_tracker_id => '', :source_role_id => '2', + :target_tracker_ids => ['2', '3'], :target_role_ids => ['1', '3'] + assert_response 200 + assert_select 'div.flash.error', :text => 'Please select a source tracker or role' + end + end + + def test_post_copy_with_incomplete_target_specification_should_fail + assert_no_difference 'WorkflowRule.count' do + post :copy, + :source_tracker_id => '1', :source_role_id => '2', + :target_tracker_ids => ['2', '3'] + assert_response 200 + assert_select 'div.flash.error', :text => 'Please select target tracker(s) and role(s)' + end + end + # Returns an array of status transitions that can be compared def status_transitions(conditions) WorkflowTransition. |