From d4ad81e657e08630cca80c69b05d7d5fcc6c83d8 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 2 Jan 2010 15:04:43 -0800 Subject: Correct unexpected error in gallery_rest_put_album_no_path_test --- modules/gallery/tests/Gallery_Rest_Helper_Test.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/gallery/tests/Gallery_Rest_Helper_Test.php b/modules/gallery/tests/Gallery_Rest_Helper_Test.php index 605a4f37..65a60ff1 100644 --- a/modules/gallery/tests/Gallery_Rest_Helper_Test.php +++ b/modules/gallery/tests/Gallery_Rest_Helper_Test.php @@ -132,8 +132,13 @@ class Gallery_Rest_Helper_Test extends Unit_Test_Case { "title" => "Updated Title", "name" => "new name"); - $this->assert_equal(json_encode(array("status" => "ERROR", "message" => "Invalid request")), - gallery_rest::put($request)); + try { + gallery_rest::put($request); + } catch (Rest_Exception $e) { + $this->assert_equal("400 Bad request", $e->getMessage()); + } catch (Exception $e) { + $this->assert_false(true, $e->__toString()); + } } public function gallery_rest_put_album_not_found_test() { -- cgit v1.2.3