diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2019-08-22 06:57:55 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-08-22 06:57:55 +0300 |
commit | 64bfb41c553a45855e86737298185c1395bbb350 (patch) | |
tree | 52031f841b0fe98cc38a9a75f93f5abcfa6f1663 /test | |
parent | f740d786a37dc85d9b702dd5054d4978ee18a202 (diff) | |
download | pleroma-64bfb41c553a45855e86737298185c1395bbb350.tar.gz pleroma-64bfb41c553a45855e86737298185c1395bbb350.zip |
fixed unfollow for relay actor
Diffstat (limited to 'test')
-rw-r--r-- | test/web/activity_pub/activity_pub_controller_test.exs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs index 77f5e39fa..cf71066fd 100644 --- a/test/web/activity_pub/activity_pub_controller_test.exs +++ b/test/web/activity_pub/activity_pub_controller_test.exs @@ -12,6 +12,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do alias Pleroma.Web.ActivityPub.ObjectView alias Pleroma.Web.ActivityPub.UserView alias Pleroma.Web.ActivityPub.Utils + alias Pleroma.Web.ActivityPub.Relay alias Pleroma.Web.CommonAPI setup_all do @@ -593,6 +594,34 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do end end + describe "/relay/followers" do + test "it returns relay followers", %{conn: conn} do + relay_actor = Relay.get_actor() + user = insert(:user) + User.follow(user, relay_actor) + + result = + conn + |> assign(:relay, true) + |> get("/relay/followers") + |> json_response(200) + + assert result["first"]["orderedItems"] == [user.ap_id] + end + end + + describe "/relay/following" do + test "it returns relay following", %{conn: conn} do + result = + conn + |> assign(:relay, true) + |> get("/relay/following") + |> json_response(200) + + assert result["first"]["orderedItems"] == [] + end + end + describe "/users/:nickname/followers" do test "it returns the followers in a collection", %{conn: conn} do user = insert(:user) |