X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=inline;f=test%2Fpleroma%2Fweb%2Fo_auth%2Fapp_test.exs;h=3c5ca07ae4468c7b5da504cc67d64991658750b4;hb=4a82f19ce64616a950710cf77035357e7edaaddd;hp=24d7049f18d54d984839a29cd2948684043428a4;hpb=e4f1d8f48c85b8a388d6c3945db157de5ce588c5;p=akkoma
diff --git a/test/pleroma/web/o_auth/app_test.exs b/test/pleroma/web/o_auth/app_test.exs
index 24d7049f1..3c5ca07ae 100644
--- a/test/pleroma/web/o_auth/app_test.exs
+++ b/test/pleroma/web/o_auth/app_test.exs
@@ -1,5 +1,5 @@
# 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
@@ -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 Enum.sort(App.get_user_apps(user)) == Enum.sort(apps)
+ end
end