diff options
| author | Maksim Pechnikov <parallel588@gmail.com> | 2020-02-10 07:59:52 +0300 |
|---|---|---|
| committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-02-10 07:59:52 +0300 |
| commit | b87533760bb386e85eb8c806e1d242d2b1380971 (patch) | |
| tree | 5bdd76fba3da0d90a4c81fff6a930f47b15d4f4c /test/web/activity_pub/activity_pub_test.exs | |
| parent | ba5e8a644463a19b863e862def80adb6a5a1060b (diff) | |
| parent | 544bdbfb90d764a5aba8ed07c13b842838d76d73 (diff) | |
| download | pleroma-b87533760bb386e85eb8c806e1d242d2b1380971.tar.gz pleroma-b87533760bb386e85eb8c806e1d242d2b1380971.zip | |
Merge branch 'develop' into issue/1276
Diffstat (limited to 'test/web/activity_pub/activity_pub_test.exs')
| -rw-r--r-- | test/web/activity_pub/activity_pub_test.exs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/web/activity_pub/activity_pub_test.exs b/test/web/activity_pub/activity_pub_test.exs index ff4604a52..ce68e7d0e 100644 --- a/test/web/activity_pub/activity_pub_test.exs +++ b/test/web/activity_pub/activity_pub_test.exs @@ -877,7 +877,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do assert reaction_activity assert reaction_activity.data["actor"] == reactor.ap_id - assert reaction_activity.data["type"] == "EmojiReaction" + assert reaction_activity.data["type"] == "EmojiReact" assert reaction_activity.data["content"] == "🔥" assert reaction_activity.data["object"] == object.data["id"] assert reaction_activity.data["to"] == [User.ap_followers(reactor), activity.data["actor"]] @@ -1174,6 +1174,23 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do assert embedded_object["object"] == followed.ap_id assert embedded_object["id"] == follow_activity.data["id"] end + + test "creates an undo activity for a pending follow request" do + follower = insert(:user) + followed = insert(:user, %{locked: true}) + + {:ok, follow_activity} = ActivityPub.follow(follower, followed) + {:ok, activity} = ActivityPub.unfollow(follower, followed) + + assert activity.data["type"] == "Undo" + assert activity.data["actor"] == follower.ap_id + + embedded_object = activity.data["object"] + assert is_map(embedded_object) + assert embedded_object["type"] == "Follow" + assert embedded_object["object"] == followed.ap_id + assert embedded_object["id"] == follow_activity.data["id"] + end end describe "blocking / unblocking" do |
