X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fadmin_api%2Fsearch_test.exs;h=b974cedd5a2dd7ce11566bef41b76a0534c2036e;hb=7ac5f210ea386b9c0e75626a71fd01c6ef9d4408;hp=082e691c4b54195e59e0489bcdfa404bfaa0a977;hpb=10ff01acd95d42314b4eb923e5b7a7191356b73e;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