diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-12-27 18:29:03 -0600 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-12-27 18:29:03 -0600 |
commit | cb2a072e6252b7c3f6473f7cfd1af5c0ec732d7b (patch) | |
tree | 1ffd2410f6f1f8c706c79b4f58499b9fbf1cc86a | |
parent | 2e4a1c56c36fcd4b9ef34bd3a771abfe21cc71d5 (diff) | |
download | pleroma-cb2a072e6252b7c3f6473f7cfd1af5c0ec732d7b.tar.gz |
Apps: add test for get_user_apps/1
-rw-r--r-- | test/pleroma/web/o_auth/app_test.exs | 12 |
1 files changed, 12 insertions, 0 deletions
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 |