Limit search for unauthenticated users to local users only

This commit is contained in:
Egor Kislitsyn 2019-06-05 16:34:14 +07:00
commit 5b04f07a1e
4 changed files with 178 additions and 117 deletions

View file

@ -2173,8 +2173,11 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
end
test "search fetches remote accounts", %{conn: conn} do
user = insert(:user)
conn =
conn
|> assign(:user, user)
|> get("/api/v1/search", %{"q" => "shp@social.heldscal.la", "resolve" => "true"})
assert results = json_response(conn, 200)