summaryrefslogtreecommitdiff
path: root/modules/gallery/tests
diff options
context:
space:
mode:
authorshadlaws <shad@shadlaws.com>2013-01-28 14:47:26 +0100
committershadlaws <shad@shadlaws.com>2013-01-28 14:47:26 +0100
commit1313a02bf4e28c169c672a342d7ad16f9b4b17dc (patch)
tree9b82ec81586142f531c8383c094022ce45d3da2d /modules/gallery/tests
parentdaad29e5c391d15d99cd8f3f5af8aaf3e3b76749 (diff)
#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.
Diffstat (limited to 'modules/gallery/tests')
-rw-r--r--modules/gallery/tests/Item_Helper_Test.php5
1 files changed, 4 insertions, 1 deletions
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);