forked from mirrors/akkoma
Apps: add test for get_user_apps/1
This commit is contained in:
parent
2e4a1c56c3
commit
cb2a072e62
|
@ -41,4 +41,16 @@ test "has unique client_id" 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
|
||||
|
|
Loading…
Reference in a new issue