summaryrefslogtreecommitdiffstats
path: root/test/unit/issue_nested_set_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-07-30 08:23:54 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-07-30 08:23:54 +0000
commitc49451eb102d62fcc0982721ccad14087883f9ce (patch)
tree0d6aa6c7a78b6236b7f84c28fd3bd84d5a9f2fbe /test/unit/issue_nested_set_test.rb
parentc20b1d64a72fd50c8d8de9d32d811b803ca1e6bb (diff)
downloadredmine-c49451eb102d62fcc0982721ccad14087883f9ce.tar.gz
redmine-c49451eb102d62fcc0982721ccad14087883f9ce.zip
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
Diffstat (limited to 'test/unit/issue_nested_set_test.rb')
-rw-r--r--test/unit/issue_nested_set_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/issue_nested_set_test.rb b/test/unit/issue_nested_set_test.rb
index c3120e82a..0d83671e0 100644
--- a/test/unit/issue_nested_set_test.rb
+++ b/test/unit/issue_nested_set_test.rb
@@ -57,7 +57,7 @@ class IssueNestedSetTest < ActiveSupport::TestCase
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
@@ -163,7 +163,7 @@ class IssueNestedSetTest < ActiveSupport::TestCase
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