diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-07-14 14:14:43 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-07-14 14:29:03 -0500 |
commit | 33f1b29b2c9cfe6f09c6b088b8b6f7bf14379b9b (patch) | |
tree | 8787f453ed68c3835f42c1867140ccbb65daf2b8 /test/web/admin_api/search_test.exs | |
parent | b750129da1434823746e3dbc237d0e04552fa753 (diff) | |
download | pleroma-33f1b29b2c9cfe6f09c6b088b8b6f7bf14379b9b.tar.gz pleroma-33f1b29b2c9cfe6f09c6b088b8b6f7bf14379b9b.zip |
AdminAPI: Filter users by `need_approval`
Diffstat (limited to 'test/web/admin_api/search_test.exs')
-rw-r--r-- | test/web/admin_api/search_test.exs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/web/admin_api/search_test.exs b/test/web/admin_api/search_test.exs index e0e3d4153..b974cedd5 100644 --- a/test/web/admin_api/search_test.exs +++ b/test/web/admin_api/search_test.exs @@ -166,5 +166,16 @@ defmodule Pleroma.Web.AdminAPI.SearchTest do assert total == 3 assert count == 1 end + + test "it returns unapproved user" do + unapproved = insert(:user, approval_pending: true) + insert(:user) + insert(:user) + + {:ok, _results, total} = Search.user() + {:ok, [^unapproved], count} = Search.user(%{need_approval: true}) + assert total == 3 + assert count == 1 + end end end |