Move user search to User module.
This commit is contained in:
parent
efe12e1a73
commit
502cb38cd6
4 changed files with 27 additions and 15 deletions
|
|
@ -319,6 +319,19 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
|
|||
end)
|
||||
end
|
||||
|
||||
test "account seach", %{conn: conn} do
|
||||
user = insert(:user)
|
||||
user_two = insert(:user, %{nickname: "shp@shitposter.club"})
|
||||
user_three = insert(:user, %{nickname: "shp@heldscal.la", name: "I love 2hu"})
|
||||
|
||||
conn = conn
|
||||
|> assign(:user, user)
|
||||
|> get("/api/v1/accounts/search", %{"q" => "2hu"})
|
||||
|
||||
assert [account] = json_response(conn, 200)
|
||||
assert account["id"] == user_three.id
|
||||
end
|
||||
|
||||
test "search", %{conn: conn} do
|
||||
user = insert(:user)
|
||||
user_two = insert(:user, %{nickname: "shp@shitposter.club"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue