projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
relay test: don't do preloading (since follow objects are activities, it's a mess)
[akkoma]
/
test
/
user_test.exs
diff --git
a/test/user_test.exs
b/test/user_test.exs
index 1f54f3e30dae5ccc9e4530e77df2150faaa79433..442599910bff55b2bbc27ad7c33ed26f985e3741 100644
(file)
--- a/
test/user_test.exs
+++ b/
test/user_test.exs
@@
-879,7
+879,11
@@
defmodule Pleroma.UserTest do
user = insert(:user, %{nickname: "john"})
Enum.each(["john", "jo", "j"], fn query ->
user = insert(:user, %{nickname: "john"})
Enum.each(["john", "jo", "j"], fn query ->
- assert user == User.search(query) |> List.first() |> Map.put(:search_rank, nil)
+ assert user ==
+ User.search(query)
+ |> List.first()
+ |> Map.put(:search_rank, nil)
+ |> Map.put(:search_type, nil)
end)
end
end)
end
@@
-887,7
+891,11
@@
defmodule Pleroma.UserTest do
user = insert(:user, %{name: "John Doe"})
Enum.each(["John Doe", "JOHN", "doe", "j d", "j", "d"], fn query ->
user = insert(:user, %{name: "John Doe"})
Enum.each(["John Doe", "JOHN", "doe", "j d", "j", "d"], fn query ->
- assert user == User.search(query) |> List.first() |> Map.put(:search_rank, nil)
+ assert user ==
+ User.search(query)
+ |> List.first()
+ |> Map.put(:search_rank, nil)
+ |> Map.put(:search_type, nil)
end)
end
end)
end
@@
-941,6
+949,7
@@
defmodule Pleroma.UserTest do
User.search("lain@pleroma.soykaf.com")
|> List.first()
|> Map.put(:search_rank, nil)
User.search("lain@pleroma.soykaf.com")
|> List.first()
|> Map.put(:search_rank, nil)
+ |> Map.put(:search_type, nil)
end
test "does not yield false-positive matches" do
end
test "does not yield false-positive matches" do
@@
-958,7
+967,7
@@
defmodule Pleroma.UserTest do
user = User.get_by_ap_id("http://mastodon.example.org/users/admin")
assert length(results) == 1
user = User.get_by_ap_id("http://mastodon.example.org/users/admin")
assert length(results) == 1
- assert user == result |> Map.put(:search_rank, nil)
+ assert user == result |> Map.put(:search_rank, nil)
|> Map.put(:search_type, nil)
end
end
end
end