Add more user filters + move search to its own module

This commit is contained in:
Maxim Filippov 2019-03-27 03:51:59 +05:00
commit 3cf7539bca
7 changed files with 256 additions and 87 deletions

View file

@ -8,6 +8,7 @@ defmodule Pleroma.UserTest do
alias Pleroma.Repo
alias Pleroma.User
alias Pleroma.Web.CommonAPI
use Pleroma.DataCase
import Pleroma.Factory
@ -1107,21 +1108,4 @@ defmodule Pleroma.UserTest do
assert {:ok, user_state3} = User.bookmark(user, id2)
assert user_state3.bookmarks == [id2]
end
describe "search for admin" do
test "it ignores case" do
insert(:user, nickname: "papercoach")
insert(:user, nickname: "CanadaPaperCoach")
{:ok, _results, count} =
User.search_for_admin(%{
query: "paper",
local: false,
page: 1,
page_size: 50
})
assert count == 2
end
end
end