diff options
| author | stwf <steven.fuchs@dockyard.com> | 2020-09-14 11:40:52 -0400 |
|---|---|---|
| committer | stwf <steven.fuchs@dockyard.com> | 2020-09-17 12:15:50 -0400 |
| commit | 41939e3175cf31884cb84acd136c303a84c77f8c (patch) | |
| tree | dfec6299b2c697f297ee1e511dbfad606a143f41 /test/web | |
| parent | 6b9bfc9e867ea49536d6fc38d674cdc2278778b8 (diff) | |
| download | pleroma-41939e3175cf31884cb84acd136c303a84c77f8c.tar.gz pleroma-41939e3175cf31884cb84acd136c303a84c77f8c.zip | |
User search respect discoverable flag
Diffstat (limited to 'test/web')
| -rw-r--r-- | test/web/admin_api/search_test.exs | 9 | ||||
| -rw-r--r-- | test/web/mastodon_api/views/account_view_test.exs | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/test/web/admin_api/search_test.exs b/test/web/admin_api/search_test.exs index b974cedd5..d88867c52 100644 --- a/test/web/admin_api/search_test.exs +++ b/test/web/admin_api/search_test.exs @@ -177,5 +177,14 @@ defmodule Pleroma.Web.AdminAPI.SearchTest do assert total == 3 assert count == 1 end + + test "it returns non-discoverable users" do + insert(:user) + insert(:user, discoverable: false) + + {:ok, _results, total} = Search.user() + + assert total == 2 + end end end diff --git a/test/web/mastodon_api/views/account_view_test.exs b/test/web/mastodon_api/views/account_view_test.exs index c5f491d6b..a54b765ef 100644 --- a/test/web/mastodon_api/views/account_view_test.exs +++ b/test/web/mastodon_api/views/account_view_test.exs @@ -68,7 +68,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do sensitive: false, pleroma: %{ actor_type: "Person", - discoverable: false + discoverable: true }, fields: [] }, @@ -166,7 +166,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do sensitive: false, pleroma: %{ actor_type: "Service", - discoverable: false + discoverable: true }, fields: [] }, |
