diff options
Diffstat (limited to 'modules/gallery/tests/Item_Model_Test.php')
-rw-r--r-- | modules/gallery/tests/Item_Model_Test.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/gallery/tests/Item_Model_Test.php b/modules/gallery/tests/Item_Model_Test.php index dc4432a6..a7eba1ad 100644 --- a/modules/gallery/tests/Item_Model_Test.php +++ b/modules/gallery/tests/Item_Model_Test.php @@ -399,7 +399,16 @@ class Item_Model_Test extends Gallery_Unit_Test_Case { $this->assert_false($response["can_edit"]); } - public function first_photo_becomes_album_cover() { + public function as_restful_array_with_add_bit_test() { + $response = item::root()->as_restful_array(); + $this->assert_true($response["can_add"]); + + identity::set_active_user(identity::guest()); + $response = item::root()->as_restful_array(); + $this->assert_false($response["can_add"]); + } + + public function first_photo_becomes_album_cover_test() { $album = test::random_album(); $photo = test::random_photo($album); $album->reload(); |