Use ILIKE to search users
This commit is contained in:
parent
9b80203ea5
commit
ed8a2935f5
2 changed files with 24 additions and 15 deletions
|
|
@ -1098,4 +1098,21 @@ 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