diff options
| author | rinpatch <rinpatch@sdf.org> | 2019-07-12 19:41:05 +0300 | 
|---|---|---|
| committer | rinpatch <rinpatch@sdf.org> | 2019-07-12 19:41:55 +0300 | 
| commit | 1f6ac7680d1ae07be7c7dfd81a8cec2ba52f1c82 (patch) | |
| tree | 292a04c3b16a380dad8510b6ef1f3bc44d9444c9 /test/web/activity_pub | |
| parent | 27ed260eed51798a20608b1c062d32bfc7b6cdc4 (diff) | |
| download | pleroma-1f6ac7680d1ae07be7c7dfd81a8cec2ba52f1c82.tar.gz pleroma-1f6ac7680d1ae07be7c7dfd81a8cec2ba52f1c82.zip | |
ActivityPub User view: Following/Followers refactoring
- Render the collection items if the user requesting == the user
rendered
- Do not render the first page if hide_{followers,follows} is set, just
give the URI to it
Diffstat (limited to 'test/web/activity_pub')
| -rw-r--r-- | test/web/activity_pub/activity_pub_controller_test.exs | 10 | 
1 files changed, 4 insertions, 6 deletions
| diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs index 1f8eb9d71..cbc25bcdb 100644 --- a/test/web/activity_pub/activity_pub_controller_test.exs +++ b/test/web/activity_pub/activity_pub_controller_test.exs @@ -551,7 +551,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do        assert result["first"]["orderedItems"] == [user.ap_id]      end -    test "it returns returns empty if the user has 'hide_followers' set", %{conn: conn} do +    test "it returns returns a uri if the user has 'hide_followers' set", %{conn: conn} do        user = insert(:user)        user_two = insert(:user, %{info: %{hide_followers: true}})        User.follow(user, user_two) @@ -561,8 +561,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do          |> get("/users/#{user_two.nickname}/followers")          |> json_response(200) -      assert result["first"]["orderedItems"] == [] -      assert result["totalItems"] == 0 +      assert is_binary(result["first"])      end      test "it works for more than 10 users", %{conn: conn} do @@ -606,7 +605,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do        assert result["first"]["orderedItems"] == [user_two.ap_id]      end -    test "it returns returns empty if the user has 'hide_follows' set", %{conn: conn} do +    test "it returns a uri if the user has 'hide_follows' set", %{conn: conn} do        user = insert(:user, %{info: %{hide_follows: true}})        user_two = insert(:user)        User.follow(user, user_two) @@ -616,8 +615,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do          |> get("/users/#{user.nickname}/following")          |> json_response(200) -      assert result["first"]["orderedItems"] == [] -      assert result["totalItems"] == 0 +      assert is_binary(result["first"])      end      test "it works for more than 10 users", %{conn: conn} do | 
