#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:
shadlaws
2013-01-28 14:47:26 +01:00
parent daad29e5c3
commit 1313a02bf4
+4 -1
View File
@@ -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);