diff options
Diffstat (limited to 'modules/tag')
-rw-r--r-- | modules/tag/helpers/tag_rest.php | 5 | ||||
-rw-r--r-- | modules/tag/tests/Tag_Rest_Helper_Test.php | 8 |
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)); } |