summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-07-03 11:02:15 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-07-03 11:02:15 +0300
commit90764670dc83c39c28cd7851f08f77f1e8bcf25a (patch)
treec075d10fc71086b5141051e3c6849e28a4f23aab /test
parent3d2989278c2f97fb5247d0b58b99b77f400f3185 (diff)
downloadpleroma-90764670dc83c39c28cd7851f08f77f1e8bcf25a.tar.gz
pleroma-90764670dc83c39c28cd7851f08f77f1e8bcf25a.zip
[#1892] Excluded internal users (applications) from user search results, reinstated service actors in search results.
Diffstat (limited to 'test')
-rw-r--r--test/user_search_test.exs10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/user_search_test.exs b/test/user_search_test.exs
index 9a74b9764..f030523d3 100644
--- a/test/user_search_test.exs
+++ b/test/user_search_test.exs
@@ -25,11 +25,13 @@ defmodule Pleroma.UserSearchTest do
assert found_user.id == user.id
end
- test "excludes bots from results" do
- insert(:user, actor_type: "Service", nickname: "bot1")
- insert(:user, actor_type: "Application", nickname: "bot2")
+ test "excludes service actors from results" do
+ insert(:user, actor_type: "Application", nickname: "user1")
+ service = insert(:user, actor_type: "Service", nickname: "user2")
+ person = insert(:user, actor_type: "Person", nickname: "user3")
- assert [] = User.search("bot")
+ assert [found_user1, found_user2] = User.search("user")
+ assert [found_user1.id, found_user2.id] -- [service.id, person.id] == []
end
test "accepts limit parameter" do