This commit is contained in:
lain 2018-11-14 20:41:12 +01:00
parent 7b170cd616
commit 27aa136aac
2 changed files with 5 additions and 5 deletions

View file

@ -248,7 +248,6 @@ defmodule Pleroma.Web.Router do
) )
get("/statuses/networkpublic_timeline", TwitterAPI.Controller, :public_and_external_timeline) get("/statuses/networkpublic_timeline", TwitterAPI.Controller, :public_and_external_timeline)
end end
scope "/api", Pleroma.Web, as: :twitter_api_search do scope "/api", Pleroma.Web, as: :twitter_api_search do

View file

@ -1218,12 +1218,13 @@ test "it returns users, ordered by similarity", %{conn: conn} do
user_two = insert(:user, %{name: "ean"}) user_two = insert(:user, %{name: "ean"})
user_three = insert(:user, %{name: "ebn"}) user_three = insert(:user, %{name: "ebn"})
resp = conn resp =
conn
|> get(twitter_api_search__path(conn, :search_user), query: "eal") |> get(twitter_api_search__path(conn, :search_user), query: "eal")
|> json_response(200) |> json_response(200)
assert length(resp) == 3 assert length(resp) == 3
assert [user.id, user_two.id, user_three.id] == Enum.map(resp, fn (%{"id" => id}) -> id end) assert [user.id, user_two.id, user_three.id] == Enum.map(resp, fn %{"id" => id} -> id end)
end end
end end
end end