Adds functional tests.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8948 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-02-23 14:39:55 +00:00
parent e6a64aa00b
commit c49ef8e543
3 changed files with 43 additions and 0 deletions
@@ -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")