diff --git a/test/functional/issue_moves_controller_test.rb b/test/functional/issue_moves_controller_test.rb
index e8c36796430f8efc11acac73d679959b10135b35..7bb95f7e873accef0e32e3257fca043a5acde013 100644
--- a/test/functional/issue_moves_controller_test.rb
+++ b/test/functional/issue_moves_controller_test.rb
@@ -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