Apps: add test for get_user_apps/1

stable
Alex Gleason 3 years ago
parent 2e4a1c56c3
commit cb2a072e62
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

@ -41,4 +41,16 @@ defmodule Pleroma.Web.OAuth.AppTest 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

Loading…
Cancel
Save