mirror of
https://github.com/redmine/redmine.git
synced 2026-06-15 22:50:41 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user