diff options
author | rinpatch <rinpatch@sdf.org> | 2019-10-16 15:09:39 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-10-16 15:09:39 +0300 |
commit | b8be6a4dc92ef067bc6844a89095986f07367fba (patch) | |
tree | 3b354746e77f58aac675d25b8fed44c650ef8ba7 | |
parent | 0a5175ecbb796cf3c192a42dc561debd73640a54 (diff) | |
download | pleroma-b8be6a4dc92ef067bc6844a89095986f07367fba.tar.gz |
Remove a failing search test due to it being unrealistic
While the case tested (`lain@ple`) gives wrong ordering due to
using only trigram to order, it almost never happens in reality. In reality
it would be either `lain` (in which case it's fine to list the user with `lain`
in display name first), or `@lain@pleroma.soykaf.com`/`lain@pleroma.soykaf.com` (which is
handled fine as well)
-rw-r--r-- | test/user_search_test.exs | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/test/user_search_test.exs b/test/user_search_test.exs index e413f0893..78a02d536 100644 --- a/test/user_search_test.exs +++ b/test/user_search_test.exs @@ -65,15 +65,6 @@ defmodule Pleroma.UserSearchTest do assert [u2.id, u1.id] == Enum.map(User.search("bar word"), & &1.id) end - test "finds users, ranking by similarity" do - u1 = insert(:user, %{name: "lain"}) - _u2 = insert(:user, %{name: "ean"}) - u3 = insert(:user, %{name: "ebn", nickname: "lain@mastodon.social"}) - u4 = insert(:user, %{nickname: "lain@pleroma.soykaf.com"}) - - assert [u4.id, u3.id, u1.id] == Enum.map(User.search("lain@ple", for_user: u1), & &1.id) - end - test "finds users, boosting ranks of friends and followers" do u1 = insert(:user) u2 = insert(:user, %{name: "Doe"}) |