summaryrefslogtreecommitdiff
path: root/modules/tag
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-23 12:13:14 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-23 12:13:14 -0800
commita60969401852ddda878bd2a3444d6378899d4dcc (patch)
treebdb4f90ae4864ed72a0acb6fc1705c18eecde936 /modules/tag
parent4960061b562a0d5adafd767af7856d1a80a549a6 (diff)
Update tests for recent REST changes.
Diffstat (limited to 'modules/tag')
-rw-r--r--modules/tag/helpers/tag_rest.php5
-rw-r--r--modules/tag/tests/Tag_Rest_Helper_Test.php8
2 files changed, 9 insertions, 4 deletions
diff --git a/modules/tag/helpers/tag_rest.php b/modules/tag/helpers/tag_rest.php
index 4fe9bef9..4b2a4b46 100644
--- a/modules/tag/helpers/tag_rest.php
+++ b/modules/tag/helpers/tag_rest.php
@@ -31,8 +31,9 @@ class tag_rest_Core {
"url" => $request->url,
"resource" => $tag->as_array(),
"relationships" => array(
- "url" => rest::url("tag_items", $tag),
- "items" => $tag_items));
+ "items" => array(
+ "url" => rest::url("tag_items", $tag),
+ "members" => $tag_items)));
}
static function post($request) {
diff --git a/modules/tag/tests/Tag_Rest_Helper_Test.php b/modules/tag/tests/Tag_Rest_Helper_Test.php
index cbd7b6cd..eacf91b3 100644
--- a/modules/tag/tests/Tag_Rest_Helper_Test.php
+++ b/modules/tag/tests/Tag_Rest_Helper_Test.php
@@ -34,7 +34,9 @@ class Tag_Rest_Helper_Test extends Gallery_Unit_Test_Case {
"resource" => $tag->as_array(),
"relationships" => array(
"items" => array(
- rest::url("tag_item", $tag, item::root())))),
+ "url" => rest::url("tag_items", $tag),
+ "members" => array(
+ rest::url("tag_item", $tag, item::root()))))),
tag_rest::get($request));
}
@@ -56,7 +58,9 @@ class Tag_Rest_Helper_Test extends Gallery_Unit_Test_Case {
array("url" => rest::url("tag", $tag),
"resource" => $tag->as_array(),
"relationships" => array(
- "items" => array())),
+ "items" => array(
+ "url" => rest::url("tag_items", $tag),
+ "members" => array()))),
tag_rest::get($request));
}