summaryrefslogtreecommitdiff
path: root/modules/gallery/tests
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-12-08 23:27:43 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-12-08 23:27:43 -0800
commit9319f37c4f157c5b0787df9116889e4e9ea5df78 (patch)
tree17a8f9085b9562e47aea613f3522f6632c5f92bc /modules/gallery/tests
parent837396ca2889b9e4e4a7b33a31409a2cd12a483c (diff)
Correct the error message when the item is not found; remove the check for no request_key (access_token) as athat is treated as public permissions
Diffstat (limited to 'modules/gallery/tests')
-rw-r--r--modules/gallery/tests/Gallery_Rest_Helper_Test.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/modules/gallery/tests/Gallery_Rest_Helper_Test.php b/modules/gallery/tests/Gallery_Rest_Helper_Test.php
index ea1841d0..1bf0b1ca 100644
--- a/modules/gallery/tests/Gallery_Rest_Helper_Test.php
+++ b/modules/gallery/tests/Gallery_Rest_Helper_Test.php
@@ -55,7 +55,6 @@ class Gallery_Rest_Helper_Test extends Unit_Test_Case {
public function gallery_rest_get_album_test() {
$request = (object)array("path" => $this->_child->relative_path());
- print Kohana::debug($request) . "\n";
$this->assert_equal(
json_encode(array("status" => "OK",
@@ -70,6 +69,20 @@ class Gallery_Rest_Helper_Test extends Unit_Test_Case {
"has_children" => false,
"path" => $this->_photo->relative_path(),
"title" => $this->_photo->title))))),
- gallery_rest::get_album($request));
+ gallery_rest::get($request));
+ }
+
+ public function gallery_rest_get_photo_test() {
+ $request = (object)array("path" => $this->_photo->relative_path());
+
+ $this->assert_equal(
+ json_encode(array("status" => "OK",
+ "photo" => array("path" => $this->_photo->relative_path(),
+ "title" => $this->_photo->title,
+ "thumb_url" => $this->_photo->thumb_url(),
+ "url" => $this->_photo->abs_url(),
+ "description" => $this->_photo->description,
+ "internet_address" => $this->_photo->slug))),
+ gallery_rest::get($request));
}
}