summaryrefslogtreecommitdiff
path: root/test/web/activity_pub
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-01-13 12:41:07 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-01-13 12:41:07 +0300
commitb7908844f24f4ede4244261d43f30ed3724efbb7 (patch)
tree1b2f17fbba3cbd006573b8447117cc9e35c09d99 /test/web/activity_pub
parent54c9db38c8035ecc115e136a09a3d991e426959a (diff)
parenta431e8c9f7033c739e10b0e8b34c75f2cc1d38d4 (diff)
downloadpleroma-b7908844f24f4ede4244261d43f30ed3724efbb7.tar.gz
pleroma-b7908844f24f4ede4244261d43f30ed3724efbb7.zip
Merge branch 'develop' into issue/1383
Diffstat (limited to 'test/web/activity_pub')
-rw-r--r--test/web/activity_pub/publisher_test.exs21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/web/activity_pub/publisher_test.exs b/test/web/activity_pub/publisher_test.exs
index e885e5a5a..015af19ab 100644
--- a/test/web/activity_pub/publisher_test.exs
+++ b/test/web/activity_pub/publisher_test.exs
@@ -23,6 +23,27 @@ defmodule Pleroma.Web.ActivityPub.PublisherTest do
:ok
end
+ describe "gather_webfinger_links/1" do
+ test "it returns links" do
+ user = insert(:user)
+
+ expected_links = [
+ %{"href" => user.ap_id, "rel" => "self", "type" => "application/activity+json"},
+ %{
+ "href" => user.ap_id,
+ "rel" => "self",
+ "type" => "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\""
+ },
+ %{
+ "rel" => "http://ostatus.org/schema/1.0/subscribe",
+ "template" => "#{Pleroma.Web.base_url()}/ostatus_subscribe?acct={uri}"
+ }
+ ]
+
+ assert expected_links == Publisher.gather_webfinger_links(user)
+ end
+ end
+
describe "determine_inbox/2" do
test "it returns sharedInbox for messages involving as:Public in to" do
user =