diff options
Diffstat (limited to 'modules/gallery/tests/Gallery_Rest_Helper_Test.php')
-rw-r--r-- | modules/gallery/tests/Gallery_Rest_Helper_Test.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/modules/gallery/tests/Gallery_Rest_Helper_Test.php b/modules/gallery/tests/Gallery_Rest_Helper_Test.php index f36f6aaf..fba83d47 100644 --- a/modules/gallery/tests/Gallery_Rest_Helper_Test.php +++ b/modules/gallery/tests/Gallery_Rest_Helper_Test.php @@ -136,8 +136,12 @@ class Gallery_Rest_Helper_Test extends Unit_Test_Case { "title" => "Updated Title", "name" => "new name"); - $this->assert_equal(json_encode(array("status" => "ERROR", "message" => "Resource not found")), - gallery_rest::put($request)); + try { + gallery_rest::put($request); + } catch (Kohana_404_Exception $k404) { + } catch (Exception $e) { + $this->assert_false(true, $e->__toString()); + } } public function gallery_rest_put_album_no_edit_permission_test() { @@ -147,8 +151,12 @@ class Gallery_Rest_Helper_Test extends Unit_Test_Case { "title" => "Updated Title", "name" => "new name"); - $this->assert_equal(json_encode(array("status" => "ERROR", "message" => "Resource not found")), - gallery_rest::put($request)); + try { + gallery_rest::put($request); + } catch (Kohana_404_Exception $k404) { + } catch (Exception $e) { + $this->assert_false(true, $e->__toString()); + } } public function gallery_rest_put_album_rename_conflict_test() { |