Merge branch 'guppe-example' into 'develop'
ActivtityPub Test: Add example for guppe actor See merge request pleroma/pleroma!3243
This commit is contained in:
commit
5822338f3a
2 changed files with 44 additions and 0 deletions
|
|
@ -190,6 +190,24 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
|
|||
|
||||
assert user.accepts_chat_messages
|
||||
end
|
||||
|
||||
test "works for guppe actors" do
|
||||
user_id = "https://gup.pe/u/bernie2020"
|
||||
|
||||
Tesla.Mock.mock(fn
|
||||
%{method: :get, url: ^user_id} ->
|
||||
%Tesla.Env{
|
||||
status: 200,
|
||||
body: File.read!("test/fixtures/guppe-actor.json"),
|
||||
headers: [{"content-type", "application/activity+json"}]
|
||||
}
|
||||
end)
|
||||
|
||||
{:ok, user} = ActivityPub.make_user_from_ap_id(user_id)
|
||||
|
||||
assert user.name == "Bernie2020 group"
|
||||
assert user.actor_type == "Group"
|
||||
end
|
||||
end
|
||||
|
||||
test "it fetches the appropriate tag-restricted posts" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue