]> source.dussan.org Git - redmine.git/commitdiff
Do assertions on collection, not on association.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 26 Dec 2011 12:37:24 +0000 (12:37 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 26 Dec 2011 12:37:24 +0000 (12:37 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8385 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/project_test.rb

index ad299b493e0dba315249f7b24a31917688ee4640..389b79d5cb6cf264e05f982384efbc82bf2847a8 100644 (file)
@@ -280,7 +280,7 @@ class ProjectTest < ActiveSupport::TestCase
 
     parent.reload
     assert_equal 4, parent.children.size
-    assert_equal parent.children.sort_by(&:name), parent.children
+    assert_equal parent.children.all.sort_by(&:name), parent.children.all
   end
 
   def test_rebuild_should_sort_children_alphabetically
@@ -296,7 +296,7 @@ class ProjectTest < ActiveSupport::TestCase
 
     parent.reload
     assert_equal 4, parent.children.size
-    assert_equal parent.children.sort_by(&:name), parent.children
+    assert_equal parent.children.all.sort_by(&:name), parent.children.all
   end