From dc7bf9486f9eaa3f8633c51c786434cec1605834 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 6 Mar 2013 14:33:24 -0500 Subject: Follow-on for #2043. Fix some tests that made bad assumptions about the state of the world. These were uncovered when we ran the tests on Travis which runs the tests in a different order than what I (and apparently others) use on their dev boxes. --- modules/gallery/tests/Item_Model_Test.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/gallery/tests/Item_Model_Test.php b/modules/gallery/tests/Item_Model_Test.php index fcb5c2ad..83c9f79d 100644 --- a/modules/gallery/tests/Item_Model_Test.php +++ b/modules/gallery/tests/Item_Model_Test.php @@ -362,6 +362,7 @@ class Item_Model_Test extends Gallery_Unit_Test_Case { $response = item::root()->as_restful_array(); $this->assert_true($response["can_edit"]); + access::deny(identity::everybody(), "edit", item::root()); identity::set_active_user(identity::guest()); $response = item::root()->as_restful_array(); $this->assert_false($response["can_edit"]); @@ -371,6 +372,7 @@ class Item_Model_Test extends Gallery_Unit_Test_Case { $response = item::root()->as_restful_array(); $this->assert_true($response["can_add"]); + access::deny(identity::everybody(), "add", item::root()); identity::set_active_user(identity::guest()); $response = item::root()->as_restful_array(); $this->assert_false($response["can_add"]); -- cgit v1.2.3