not use assert_not_nil in Errors#[]

r7593 etc. replaced Rails2 Errors#on.
Rails3 Errors#[] always return array.
So, Rails3 Errors#[] is always not nil.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12070 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2013-07-30 08:23:54 +00:00
parent c20b1d64a7
commit c49451eb10
6 changed files with 13 additions and 13 deletions

View File

@@ -209,7 +209,7 @@ class ProjectsControllerTest < ActionController::TestCase
assert_response :success
project = assigns(:project)
assert_kind_of Project, project
assert_not_nil project.errors[:parent_id]
assert_not_equal [], project.errors[:parent_id]
end
test "#create by non-admin user with add_subprojects permission should create a project with a parent_id" do
@@ -244,7 +244,7 @@ class ProjectsControllerTest < ActionController::TestCase
assert_response :success
project = assigns(:project)
assert_kind_of Project, project
assert_not_nil project.errors[:parent_id]
assert_not_equal [], project.errors[:parent_id]
end
test "#create by non-admin user with add_subprojects permission should fail with unauthorized parent_id" do
@@ -265,7 +265,7 @@ class ProjectsControllerTest < ActionController::TestCase
assert_response :success
project = assigns(:project)
assert_kind_of Project, project
assert_not_nil project.errors[:parent_id]
assert_not_equal [], project.errors[:parent_id]
end
def test_create_subproject_with_inherit_members_should_inherit_members