aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/web/activity_pub/activity_pub_controller_test.exs15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs
index 82ad42144..52e67f046 100644
--- a/test/web/activity_pub/activity_pub_controller_test.exs
+++ b/test/web/activity_pub/activity_pub_controller_test.exs
@@ -89,6 +89,21 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
end
end
+ describe "/object/:uuid/likes" do
+ test "it returns the like activities in a collection", %{conn: conn} do
+ like = insert(:like_activity)
+ uuid = String.split(like.data["object"], "/") |> List.last()
+
+ result =
+ conn
+ |> put_req_header("accept", "application/activity+json")
+ |> get("/objects/#{uuid}/likes")
+ |> json_response(200)
+
+ assert List.first(result["first"]["orderedItems"])["id"] == like.data["id"]
+ end
+ end
+
describe "/activities/:uuid" do
test "it returns a json representation of the activity", %{conn: conn} do
activity = insert(:note_activity)