X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=inline;f=test%2Fpleroma%2Fweb%2Fo_auth%2Fapp_test.exs;h=a5223b0a53268d31c1b1213602767c9c0c33afd1;hb=cb2a072e6252b7c3f6473f7cfd1af5c0ec732d7b;hp=993a490e0519538c37f1ca17d4cdab3686d87929;hpb=409f694e4f90d34285b43c7e7afc594bc386d893;p=akkoma
diff --git a/test/pleroma/web/o_auth/app_test.exs b/test/pleroma/web/o_auth/app_test.exs
index 993a490e0..a5223b0a5 100644
--- a/test/pleroma/web/o_auth/app_test.exs
+++ b/test/pleroma/web/o_auth/app_test.exs
@@ -1,9 +1,9 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.OAuth.AppTest do
- use Pleroma.DataCase
+ use Pleroma.DataCase, async: true
alias Pleroma.Web.OAuth.App
import Pleroma.Factory
@@ -41,4 +41,16 @@ defmodule Pleroma.Web.OAuth.AppTest do
assert error.type == :unique
end
end
+
+ test "get_user_apps/1" do
+ user = insert(:user)
+
+ apps = [
+ insert(:oauth_app, user_id: user.id),
+ insert(:oauth_app, user_id: user.id),
+ insert(:oauth_app, user_id: user.id)
+ ]
+
+ assert App.get_user_apps(user) == apps
+ end
end