From cb2a072e6252b7c3f6473f7cfd1af5c0ec732d7b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 27 Dec 2021 18:29:03 -0600 Subject: [PATCH] Apps: add test for get_user_apps/1 --- test/pleroma/web/o_auth/app_test.exs | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- 2.45.2