mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-26 22:39:10 -04:00
Pick a new album cover when the photo that's the current cover is
deleted. Fixes ticket #1083.
This commit is contained in:
@@ -363,4 +363,12 @@ class Item_Model_Test extends Gallery_Unit_Test_Case {
|
||||
$this->assert_true(!array_key_exists("parent_id", $result));
|
||||
$this->assert_true(!array_key_exists("album_cover_item_id", $result));
|
||||
}
|
||||
|
||||
public function first_photo_becomes_album_cover() {
|
||||
$album = test::random_album();
|
||||
$photo = test::random_photo($album);
|
||||
$album->reload();
|
||||
|
||||
$this->assert_same($photo->id, $album->album_cover_item_id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user