summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-01-02 15:04:43 -0800
committerTim Almdal <tnalmdal@shaw.ca>2010-01-02 15:04:43 -0800
commitd4ad81e657e08630cca80c69b05d7d5fcc6c83d8 (patch)
tree13cab939adeab0650cc84c83a0272299531bf353
parent681613ac9e1fb21cab93033cf08b0e02b673e1b8 (diff)
Correct unexpected error in gallery_rest_put_album_no_path_test
-rw-r--r--modules/gallery/tests/Gallery_Rest_Helper_Test.php9
1 files changed, 7 insertions, 2 deletions
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() {