summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-18 19:49:10 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-18 19:49:10 +0000
commit143c29d8e175893f10ab2b1aa293f7e9ada8439c (patch)
tree2fa93f1e8192454e6c4a0ce8c85cccf5a09d07e4
parentf79961f1c53384f75e244fc4b718e33964fce365 (diff)
downloadredmine-143c29d8e175893f10ab2b1aa293f7e9ada8439c.tar.gz
redmine-143c29d8e175893f10ab2b1aa293f7e9ada8439c.zip
Additional test for TrackersController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9441 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/functional/trackers_controller_test.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/functional/trackers_controller_test.rb b/test/functional/trackers_controller_test.rb
index d7a2d0fac..cf6b553de 100644
--- a/test/functional/trackers_controller_test.rb
+++ b/test/functional/trackers_controller_test.rb
@@ -78,12 +78,13 @@ class TrackersControllerTest < ActionController::TestCase
assert_equal Tracker.find(1).workflows.count, tracker.workflows.count
end
- def test_create_new_failure
+ def test_create_with_failure
assert_no_difference 'Tracker.count' do
post :create, :tracker => { :name => '', :project_ids => ['1', '', ''], :custom_field_ids => ['1', '6', ''] }
end
assert_response :success
assert_template 'new'
+ assert_error_tag :content => /name can't be blank/i
end
def test_edit
@@ -120,6 +121,13 @@ class TrackersControllerTest < ActionController::TestCase
assert Tracker.find(1).project_ids.empty?
end
+ def test_update_with_failure
+ put :update, :id => 1, :tracker => { :name => '' }
+ assert_response :success
+ assert_template 'edit'
+ assert_error_tag :content => /name can't be blank/i
+ end
+
def test_move_lower
tracker = Tracker.find_by_position(1)
put :update, :id => 1, :tracker => { :move_to => 'lower' }