X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Factivity_pub%2Factivity_pub_controller_test.exs;h=398bedf7793f378b6a4e48a6e2adec5917497582;hb=833161b5d21f85e2276cd0cee3e148ecbe6e1f05;hp=0a0103793520ebad0408a89fdafb53dae8ca74e0;hpb=7e384a2425b5188ca76aad4b97172b553ca9b640;p=akkoma diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs index 0a0103793..398bedf77 100644 --- a/test/web/activity_pub/activity_pub_controller_test.exs +++ b/test/web/activity_pub/activity_pub_controller_test.exs @@ -5,8 +5,13 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do use Pleroma.Web.ConnCase import Pleroma.Factory - alias Pleroma.Web.ActivityPub.{UserView, ObjectView} - alias Pleroma.{Object, Repo, Activity, User, Instances} + alias Pleroma.Web.ActivityPub.UserView + alias Pleroma.Web.ActivityPub.ObjectView + alias Pleroma.Object + alias Pleroma.Repo + alias Pleroma.Activity + alias Pleroma.User + alias Pleroma.Instances setup_all do Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end) @@ -397,7 +402,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do |> json_response(200) assert result["first"]["orderedItems"] == [] - assert result["totalItems"] == 1 + assert result["totalItems"] == 0 end test "it works for more than 10 users", %{conn: conn} do @@ -441,8 +446,8 @@ 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_followings' set", %{conn: conn} do - user = insert(:user, %{info: %{hide_followings: true}}) + test "it returns returns empty 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) @@ -452,7 +457,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do |> json_response(200) assert result["first"]["orderedItems"] == [] - assert result["totalItems"] == 1 + assert result["totalItems"] == 0 end test "it works for more than 10 users", %{conn: conn} do