summaryrefslogtreecommitdiff
path: root/modules/gallery/tests/Item_Model_Test.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-05-14 06:32:26 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-05-14 06:32:26 -0700
commit28aee011307e37cd80e9bef0f08cb9b0270d89b5 (patch)
treefcf044960b18f8b8ee0c193b1591376d90ee7ff9 /modules/gallery/tests/Item_Model_Test.php
parent3fe10b15cf9359b66452c24965df575203e8af8e (diff)
parent9affa8ebbd539396d71f19003b91af577a8a183e (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/gallery/tests/Item_Model_Test.php')
-rw-r--r--modules/gallery/tests/Item_Model_Test.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gallery/tests/Item_Model_Test.php b/modules/gallery/tests/Item_Model_Test.php
index 28d6fba7..15aa2d8c 100644
--- a/modules/gallery/tests/Item_Model_Test.php
+++ b/modules/gallery/tests/Item_Model_Test.php
@@ -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);
+ }
}