projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da44cdd
)
test: user: add a test for whether user search returns a user or not
author
William Pitcock
<nenolod@dereferenced.org>
Thu, 14 Feb 2019 19:59:12 +0000
(19:59 +0000)
committer
William Pitcock
<nenolod@dereferenced.org>
Thu, 14 Feb 2019 20:05:08 +0000
(20:05 +0000)
test/user_test.exs
patch
|
blob
|
history
diff --git
a/test/user_test.exs
b/test/user_test.exs
index 58587bd822896be326ebc338eb6ce02820a2aa06..a99b79a0de773e73d369e766197234fe368d353a 100644
(file)
--- a/
test/user_test.exs
+++ b/
test/user_test.exs
@@
-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