diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-01-15 18:12:08 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-01-15 18:12:08 +0300 |
commit | 5304c8cd21d72d66e5e9dc9f057ffbbe027ef5fa (patch) | |
tree | d463c35ba67fe75d8eea92097db43650f5626129 /test/web/activity_pub | |
parent | 76c1948880687ed74e0275e51808c0ddc6be887d (diff) | |
parent | 1b233aa6531b26943bd78c5d4cd8e00f2e1d318e (diff) | |
download | pleroma-5304c8cd21d72d66e5e9dc9f057ffbbe027ef5fa.tar.gz pleroma-5304c8cd21d72d66e5e9dc9f057ffbbe027ef5fa.zip |
Merge remote-tracking branch 'remotes/origin/develop' into 1478-oauth-admin-scopes-tweaks
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 = |