diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-23 14:39:55 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-23 14:39:55 +0000 |
commit | c49ef8e543c47ebe1a50f54811545ba21159beef (patch) | |
tree | 2863729b24ed1f5c16f4a00dd48a8ef5759b9dd6 /test/functional/issue_statuses_controller_test.rb | |
parent | e6a64aa00bea61d24c0ba0e28ecaabcca53ee09b (diff) | |
download | redmine-c49ef8e543c47ebe1a50f54811545ba21159beef.tar.gz redmine-c49ef8e543c47ebe1a50f54811545ba21159beef.zip |
Adds functional tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8948 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/issue_statuses_controller_test.rb')
-rw-r--r-- | test/functional/issue_statuses_controller_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/issue_statuses_controller_test.rb b/test/functional/issue_statuses_controller_test.rb index 33519de61..c32999f80 100644 --- a/test/functional/issue_statuses_controller_test.rb +++ b/test/functional/issue_statuses_controller_test.rb @@ -49,6 +49,13 @@ class IssueStatusesControllerTest < ActionController::TestCase assert_equal 'New status', status.name end + def test_create_with_failure + post :create, :issue_status => {:name => ''} + assert_response :success + assert_template 'new' + assert_error_tag :content => /name can't be blank/i + end + def test_edit get :edit, :id => '3' assert_response :success @@ -62,6 +69,13 @@ class IssueStatusesControllerTest < ActionController::TestCase assert_equal 'Renamed status', status.name end + def test_update_with_failure + put :update, :id => '3', :issue_status => {:name => ''} + assert_response :success + assert_template 'edit' + assert_error_tag :content => /name can't be blank/i + end + def test_destroy Issue.delete_all("status_id = 1") |