projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e4a1c5
)
Apps: add test for get_user_apps/1
author
Alex Gleason
<alex@alexgleason.me>
Tue, 28 Dec 2021 00:29:03 +0000
(18:29 -0600)
committer
Alex Gleason
<alex@alexgleason.me>
Tue, 28 Dec 2021 00:29:03 +0000
(18:29 -0600)
test/pleroma/web/o_auth/app_test.exs
patch
|
blob
|
history
diff --git
a/test/pleroma/web/o_auth/app_test.exs
b/test/pleroma/web/o_auth/app_test.exs
index fc2f0d94080812820d1a3102a73f327856ffbbd8..a5223b0a53268d31c1b1213602767c9c0c33afd1 100644
(file)
--- 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