Add more user filters + move search to its own module
This commit is contained in:
parent
15aa94f40f
commit
3cf7539bca
7 changed files with 256 additions and 87 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue