diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-12-22 13:57:49 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-12-22 13:57:49 -0800 |
commit | ca293db214e2f74471ce7f9d29f65bd629f2f284 (patch) | |
tree | ee6a8c18594a32537e8466a06b505deb9946841c /modules/gallery/tests | |
parent | 0650109d4bb5442cd77fcda61745dab67a632836 (diff) |
Don't rely on implicit object -> id conversion, that doesn't work with K24's Database_Builder::where()
Diffstat (limited to 'modules/gallery/tests')
-rw-r--r-- | modules/gallery/tests/Access_Helper_Test.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/gallery/tests/Access_Helper_Test.php b/modules/gallery/tests/Access_Helper_Test.php index 799d5e44..084bfb47 100644 --- a/modules/gallery/tests/Access_Helper_Test.php +++ b/modules/gallery/tests/Access_Helper_Test.php @@ -131,7 +131,7 @@ class Access_Helper_Test extends Unit_Test_Case { public function can_allow_deny_and_reset_intent_test() { $root = ORM::factory("item", 1); $album = album::create($root, rand(), "test album"); - $intent = ORM::factory("access_intent")->where("item_id", "=", $album)->find(); + $intent = ORM::factory("access_intent")->where("item_id", "=", $album->id)->find(); // Allow access::allow(identity::everybody(), "view", $album); @@ -141,19 +141,19 @@ class Access_Helper_Test extends Unit_Test_Case { access::deny(identity::everybody(), "view", $album); $this->assert_same( access::DENY, - ORM::factory("access_intent")->where("item_id", "=", $album)->find()->view_1); + ORM::factory("access_intent")->where("item_id", "=", $album->id)->find()->view_1); // Allow again. If the initial value was allow, then the first Allow clause above may not // have actually changed any values. access::allow(identity::everybody(), "view", $album); $this->assert_same( access::ALLOW, - ORM::factory("access_intent")->where("item_id", "=", $album)->find()->view_1); + ORM::factory("access_intent")->where("item_id", "=", $album->id)->find()->view_1); access::reset(identity::everybody(), "view", $album); $this->assert_same( null, - ORM::factory("access_intent")->where("item_id", "=", $album)->find()->view_1); + ORM::factory("access_intent")->where("item_id", "=", $album->id)->find()->view_1); } public function cant_reset_root_item_test() { |