Apps: add test for get_user_apps/1

This commit is contained in:
Alex Gleason 2021-12-27 18:29:03 -06:00
parent 2e4a1c56c3
commit cb2a072e62
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -41,4 +41,16 @@ test "has unique client_id" do
assert error.type == :unique assert error.type == :unique
end end
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 end