Fix tests

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2023-07-09 19:30:54 +02:00
parent 5f5e95ebcd
commit 4e0e5ce463
2 changed files with 3 additions and 2 deletions

View file

@ -1426,6 +1426,7 @@ def get_friends_ids(%User{} = user, page \\ nil) do
def get_familiar_followers_query(%User{} = user, %User{} = current_user, nil) do
friends =
get_friends_query(current_user)
|> where([u], not u.hide_follows)
|> select([u], u.id)
User.Query.build(%{is_active: true})

View file

@ -2229,7 +2229,7 @@ test "max pinned accounts", %{user: user, conn: conn} do
setup do: oauth_access(["read:follows"])
test "fetch user familiar followers", %{user: user, conn: conn} do
other_user1 = insert(:user)
%{id: id1} = other_user1 = insert(:user)
%{id: id2} = other_user2 = insert(:user)
_ = insert(:user)
@ -2259,7 +2259,7 @@ test "returns empty array if followers are hidden", %{user: user, conn: conn} do
end
test "it respects hide_followers", %{user: user, conn: conn} do
%{id: id1} = other_user1 = insert(:user)
other_user1 = insert(:user)
%{id: id2} = other_user2 = insert(:user, hide_followers: true)
_ = insert(:user)