diff options
| author | feld <feld@feld.me> | 2020-01-12 18:20:31 +0000 |
|---|---|---|
| committer | feld <feld@feld.me> | 2020-01-12 18:20:31 +0000 |
| commit | bb5862ea2ff114c971dad36aa07b822429dcff60 (patch) | |
| tree | 85ad586ec8e904150226ce2c4749a608f7026371 /test/web/activity_pub | |
| parent | ea4a462858c16d66228ab07db6c17e3cbd9114d1 (diff) | |
| parent | e64059d218871ae3910dd00ba5bcffaafb96d74b (diff) | |
| download | pleroma-bb5862ea2ff114c971dad36aa07b822429dcff60.tar.gz pleroma-bb5862ea2ff114c971dad36aa07b822429dcff60.zip | |
Merge branch 'issue/1354' into 'develop'
[#1354] fix remote follow
See merge request pleroma/pleroma!2079
Diffstat (limited to 'test/web/activity_pub')
| -rw-r--r-- | test/web/activity_pub/publisher_test.exs | 21 |
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 = |
