]> source.dussan.org Git - redmine.git/commitdiff
Fixes unsafe assertion that may cause failures.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 10 Dec 2010 17:40:33 +0000 (17:40 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 10 Dec 2010 17:40:33 +0000 (17:40 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4485 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/issue_moves_controller_test.rb

index e8c36796430f8efc11acac73d679959b10135b35..7bb95f7e873accef0e32e3257fca043a5acde013 100644 (file)
@@ -58,8 +58,8 @@ class IssueMovesControllerTest < ActionController::TestCase
       post :create, :ids => [1, 2], :notes => 'Moving two issues'
 
       assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook'
-      assert_equal 'Moving two issues', Issue.find(1).journals.last.notes
-      assert_equal 'Moving two issues', Issue.find(2).journals.last.notes
+      assert_equal 'Moving two issues', Issue.find(1).journals.sort_by(&:id).last.notes
+      assert_equal 'Moving two issues', Issue.find(2).journals.sort_by(&:id).last.notes
 
     end