mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
test: user: add a test for whether user search returns a user or not
This commit is contained in:
parent
da44cdd381
commit
32b1649434
1 changed files with 10 additions and 0 deletions
|
@ -878,6 +878,16 @@ defmodule Pleroma.UserTest do
|
|||
assert [] == User.search(query)
|
||||
end)
|
||||
end
|
||||
|
||||
test "works with URIs" do
|
||||
results = User.search("http://mastodon.example.org/users/admin", true)
|
||||
result = results |> List.first()
|
||||
|
||||
user = User.get_by_ap_id("http://mastodon.example.org/users/admin")
|
||||
|
||||
assert length(results) == 1
|
||||
assert user == result |> Map.put(:search_rank, nil)
|
||||
end
|
||||
end
|
||||
|
||||
test "auth_active?/1 works correctly" do
|
||||
|
|
Loading…
Reference in a new issue