summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2019-09-23 18:54:23 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2019-09-23 19:47:35 +0200
commit2ad50583f0cc341413663a595890047823c9abeb (patch)
tree809f119d7e67b946d29085e59236a38fdd8a7bbf /test
parent472e7b796cfeb1445ee1572df414531655b050ce (diff)
downloadpleroma-2ad50583f0cc341413663a595890047823c9abeb.tar.gz
pleroma-2ad50583f0cc341413663a595890047823c9abeb.zip
Document and test /api/ap/whoami
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 9e8e420ec..0f8638a94 100644
--- a/test/web/activity_pub/activity_pub_controller_test.exs
+++ b/test/web/activity_pub/activity_pub_controller_test.exs
@@ -976,4 +976,19 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
assert Delivery.get(object.id, other_user.id)
end
end
+
+ describe "Additionnal ActivityPub C2S endpoints" do
+ test "/api/ap/whoami", %{conn: conn} do
+ user = insert(:user)
+
+ conn =
+ conn
+ |> assign(:user, user)
+ |> get("/api/ap/whoami")
+
+ user = User.get_cached_by_id(user.id)
+
+ assert UserView.render("user.json", %{user: user}) == json_response(conn, 200)
+ end
+ end
end