From: Alex Gleason Date: Tue, 28 Dec 2021 00:29:03 +0000 (-0600) Subject: Apps: add test for get_user_apps/1 X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=cb2a072e6252b7c3f6473f7cfd1af5c0ec732d7b;p=akkoma Apps: add test for get_user_apps/1 --- diff --git a/test/pleroma/web/o_auth/app_test.exs b/test/pleroma/web/o_auth/app_test.exs index fc2f0d940..a5223b0a5 100644 --- a/test/pleroma/web/o_auth/app_test.exs +++ b/test/pleroma/web/o_auth/app_test.exs @@ -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