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:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user