summaryrefslogtreecommitdiff
path: root/modules/gallery/tests/Access_Helper_Test.php
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-07-30 17:28:05 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-07-30 17:28:05 -0600
commit9d70f142199f4f3c3ec63fcbb125f5c33c91d9ec (patch)
tree189532a66c8996c6f69003ba01e455ce1b050a4e /modules/gallery/tests/Access_Helper_Test.php
parentca4f03b93e1c5eb90d1677684fd5220c000d7d34 (diff)
parent19d89f94f9939bbd879d6c8ead4e802f592ec808 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/tests/Access_Helper_Test.php')
-rw-r--r--modules/gallery/tests/Access_Helper_Test.php42
1 files changed, 0 insertions, 42 deletions
diff --git a/modules/gallery/tests/Access_Helper_Test.php b/modules/gallery/tests/Access_Helper_Test.php
index 737ed8a6..59cec453 100644
--- a/modules/gallery/tests/Access_Helper_Test.php
+++ b/modules/gallery/tests/Access_Helper_Test.php
@@ -101,48 +101,6 @@ class Access_Helper_Test extends Unit_Test_Case {
$this->assert_false(access::user_can($user, "view", $item), "Should be unable to view");
}
- public function owner_can_view_album_test() {
- $user = user::create("access_test", "Access Test", "");
- foreach ($user->groups as $group) {
- $user->remove($group);
- }
- $user->save();
-
- $root = ORM::factory("item", 1);
- $item = album::create($root, rand(), "test album", $user->id);
-
- $this->assert_true(access::user_can($user, "view", $item), "Should be able to view");
- }
-
- public function owner_can_view_photo_test() {
- $user = user::create("access_test", "Access Test", "");
- foreach ($user->groups as $group) {
- $user->remove($group);
- }
- $user->save();
-
- $root = ORM::factory("item", 1);
- $album = album::create($root, rand(), "test album", $user->id);
- $item = photo::create($album, MODPATH . "gallery/images/gallery.png", "", "", null, $user->id);
-
- $this->assert_true(access::user_can($user, "view", $item), "Should be able to view");
- }
-
- public function owner_cant_view_photo_test() {
- $user = user::create("access_test", "Access Test", "");
- foreach ($user->groups as $group) {
- $user->remove($group);
- }
- $user->save();
-
- $root = ORM::factory("item", 1);
- $album = album::create($root, rand(), "test album");
- access::deny(group::everybody(), "view", $album);
- $item = photo::create($album, MODPATH . "gallery/images/gallery.png", "", "", null, $user->id);
-
- $this->assert_false(access::user_can($user, "view", $item), "Should not be able to view");
- }
-
public function adding_and_removing_items_adds_ands_removes_rows_test() {
$root = ORM::factory("item", 1);
$item = album::create($root, rand(), "test album");