diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-10-30 19:23:16 +0100 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-10-30 19:23:16 +0100 |
commit | 502cb38cd69f9f8c15a0ee597584364f9d36bdf1 (patch) | |
tree | 7f8516e81ff6d1aa188904dab044fec01488bc70 /test | |
parent | efe12e1a73e13c9e749a4e6cc9c0c8a6988d87db (diff) | |
download | pleroma-502cb38cd69f9f8c15a0ee597584364f9d36bdf1.tar.gz pleroma-502cb38cd69f9f8c15a0ee597584364f9d36bdf1.zip |
Move user search to User module.
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index acdb08ac2..485a0d029 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -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"}) |