mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-27 10:14:32 -04:00
#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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user