From 1313a02bf4e28c169c672a342d7ad16f9b4b17dc Mon Sep 17 00:00:00 2001 From: shadlaws Date: Mon, 28 Jan 2013 14:47:26 +0100 Subject: #1971 - Make resequence_child_weights_test unit test more reliable. - Set the sort_column of the parent album to id, which has no possibility of being identical between the two photos. - Now, the reweighting will reverse the order even if they were created during the same second. --- modules/gallery/tests/Item_Helper_Test.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/gallery/tests/Item_Helper_Test.php b/modules/gallery/tests/Item_Helper_Test.php index 63081884..f5b99bec 100644 --- a/modules/gallery/tests/Item_Helper_Test.php +++ b/modules/gallery/tests/Item_Helper_Test.php @@ -237,7 +237,10 @@ class Item_Helper_Test extends Gallery_Unit_Test_Case { } public function resequence_child_weights_test() { - $album = test::random_album(); + $album = test::random_album_unsaved(); + $album->sort_column = "id"; + $album->save(); + $photo1 = test::random_photo($album); $photo2 = test::random_photo($album); $this->assert_true($photo2->weight > $photo1->weight); -- cgit v1.2.3