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
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
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
def test_description_length_should_be_validated
a = Attachment.new(:description => 'a' * 300)
assert !a.save
- assert_not_nil a.errors[:description]
+ assert_not_equal [], a.errors[:description]
end
def test_destroy
child = Issue.new(:project_id => 2, :tracker_id => 1, :author_id => 1,
:subject => 'child', :parent_issue_id => issue.id)
assert !child.save
- assert_not_nil child.errors[:parent_issue_id]
+ assert_not_equal [], child.errors[:parent_issue_id]
end
def test_move_a_root_to_child
child.reload
child.parent_issue_id = grandchild.id
assert !child.save
- assert_not_nil child.errors[:parent_issue_id]
+ assert_not_equal [], child.errors[:parent_issue_id]
end
def test_destroy_should_destroy_children
:relation_type => IssueRelation::TYPE_PRECEDES
)
assert !r.save
- assert_not_nil r.errors[:base]
+ assert_not_equal [], r.errors[:base]
end
def test_validates_circular_dependency_of_subtask
:relation_type => IssueRelation::TYPE_BLOCKED
)
assert !r.save
- assert_not_nil r.errors[:base]
+ assert_not_equal [], r.errors[:base]
end
def test_create_should_make_journal_entry
issue.tracker_id = 2
issue.subject = 'New subject'
assert !issue.save
- assert_not_nil issue.errors[:tracker_id]
+ assert_not_equal [], issue.errors[:tracker_id]
end
def test_category_based_assignment
:status_id => 1, :fixed_version_id => 1,
:subject => 'New issue')
assert !issue.save
- assert_not_nil issue.errors[:fixed_version_id]
+ assert_not_equal [], issue.errors[:fixed_version_id]
end
def test_should_not_be_able_to_assign_a_new_issue_to_a_locked_version
:status_id => 1, :fixed_version_id => 2,
:subject => 'New issue')
assert !issue.save
- assert_not_nil issue.errors[:fixed_version_id]
+ assert_not_equal [], issue.errors[:fixed_version_id]
end
def test_should_be_able_to_assign_a_new_issue_to_an_open_version
issue = Issue.find(11)
issue.status_id = 1
assert !issue.save
- assert_not_nil issue.errors[:base]
+ assert_not_equal [], issue.errors[:base]
end
def test_should_be_able_to_reopen_and_reassign_an_issue_assigned_to_a_closed_version
u = User.new
u.mail_notification = 'foo'
u.save
- assert_not_nil u.errors[:mail_notification]
+ assert_not_equal [], u.errors[:mail_notification]
end
def test_password