X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fadmin_api%2Fsearch_test.exs;h=b974cedd5a2dd7ce11566bef41b76a0534c2036e;hb=9733c9d06563a92e4c58ac906c5f98b617b9e731;hp=082e691c4b54195e59e0489bcdfa404bfaa0a977;hpb=6fab5fe7f892b5a9cf4d605b079e544583f0ce73;p=akkoma
diff --git a/test/web/admin_api/search_test.exs b/test/web/admin_api/search_test.exs
index 082e691c4..b974cedd5 100644
--- a/test/web/admin_api/search_test.exs
+++ b/test/web/admin_api/search_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.AdminAPI.SearchTest do
@@ -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