Skip to content

Commit

Permalink
Add "comments" relationship support.
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat committed Jun 20, 2010
1 parent ec052d7 commit 2e01685
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions modules/gallery/tests/Items_Rest_Helper_Test.php
Expand Up @@ -36,12 +36,16 @@ public function get_url_test() {
array("url" => rest::url("item", $photo1),
"entity" => $photo1->as_restful_array(),
"relationships" => array(
"comments" => array(
"url" => rest::url("item_comments", $photo1)),
"tags" => array(
"url" => rest::url("item_tags", $photo1),
"members" => array()))),
array("url" => rest::url("item", $album2),
"entity" => $album2->as_restful_array(),
"relationships" => array(
"comments" => array(
"url" => rest::url("item_comments", $album2)),
"tags" => array(
"url" => rest::url("item_tags", $album2),
"members" => array())),
Expand Down Expand Up @@ -69,6 +73,8 @@ public function get_url_filter_album_test() {
array("url" => rest::url("item", $album2),
"entity" => $album2->as_restful_array(),
"relationships" => array(
"comments" => array(
"url" => rest::url("item_comments", $album2)),
"tags" => array(
"url" => rest::url("item_tags", $album2),
"members" => array())),
Expand Down Expand Up @@ -96,6 +102,8 @@ public function get_url_filter_photo_test() {
array("url" => rest::url("item", $photo1),
"entity" => $photo1->as_restful_array(),
"relationships" => array(
"comments" => array(
"url" => rest::url("item_comments", $photo1)),
"tags" => array(
"url" => rest::url("item_tags", $photo1),
"members" => array())))),
Expand All @@ -121,12 +129,16 @@ public function get_url_filter_albums_photos_test() {
array("url" => rest::url("item", $photo1),
"entity" => $photo1->as_restful_array(),
"relationships" => array(
"comments" => array(
"url" => rest::url("item_comments", $photo1)),
"tags" => array(
"url" => rest::url("item_tags", $photo1),
"members" => array()))),
array("url" => rest::url("item", $album2),
"entity" => $album2->as_restful_array(),
"relationships" => array(
"comments" => array(
"url" => rest::url("item_comments", $album2)),
"tags" => array(
"url" => rest::url("item_tags", $album2),
"members" => array())),
Expand Down Expand Up @@ -162,6 +174,8 @@ public function get_ancestors_test() {
array("url" => rest::url("item", $album1),
"entity" => $album1->as_restful_array(),
"relationships" => array(
"comments" => array(
"url" => rest::url("item_comments", $album1)),
"tags" => array(
"url" => rest::url("item_tags", $album1),
"members" => array())),
Expand All @@ -172,6 +186,8 @@ public function get_ancestors_test() {
array("url" => rest::url("item", $album2),
"entity" => $album2->as_restful_array(),
"relationships" => array(
"comments" => array(
"url" => rest::url("item_comments", $album2)),
"tags" => array(
"url" => rest::url("item_tags", $album2),
"members" => array())),
Expand All @@ -180,6 +196,8 @@ public function get_ancestors_test() {
array("url" => rest::url("item", $photo2),
"entity" => $photo2->as_restful_array(),
"relationships" => array(
"comments" => array(
"url" => rest::url("item_comments", $photo2)),
"tags" => array(
"url" => rest::url("item_tags", $photo2),
"members" => array())))),
Expand Down

0 comments on commit 2e01685

Please sign in to comment.