summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2018-02-11 17:20:02 +0100
committerlain <lain@soykaf.club>2018-02-11 17:20:43 +0100
commitae1ec858f442aba7c2b2aea12dd60585517be17a (patch)
treef25333260c4417237268937b4c44eec2a169fe47 /test
parentc1d26751e6cd5fdfeb256e4b3ba81e1a7039894f (diff)
downloadpleroma-ae1ec858f442aba7c2b2aea12dd60585517be17a.tar.gz
pleroma-ae1ec858f442aba7c2b2aea12dd60585517be17a.zip
Basic AP user building.
Diffstat (limited to 'test')
-rw-r--r--test/web/activity_pub/activity_pub_test.exs12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/web/activity_pub/activity_pub_test.exs b/test/web/activity_pub/activity_pub_test.exs
index a38ca84ad..42d3980ea 100644
--- a/test/web/activity_pub/activity_pub_test.exs
+++ b/test/web/activity_pub/activity_pub_test.exs
@@ -7,6 +7,18 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
import Pleroma.Factory
+ describe "building a user from his ap id" do
+ test "it returns a user" do
+ user_id = "http://mastodon.example.org/users/admin"
+ {:ok, user} = ActivityPub.make_user_from_ap_id(user_id)
+ assert user.ap_id == user_id
+ assert user.nickname == "admin@mastodon.example.org"
+ assert user.info["source_data"]
+ assert user.info["ap_enabled"]
+ assert user.follower_address == "http://mastodon.example.org/users/admin/followers"
+ end
+ end
+
describe "insertion" do
test "returns the activity if one with the same id is already in" do
activity = insert(:note_activity)