projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'more-efficient-ci' into 'develop'
[akkoma]
/
test
/
pleroma
/
web
/
o_auth
/
app_test.exs
diff --git
a/test/pleroma/web/o_auth/app_test.exs
b/test/pleroma/web/o_auth/app_test.exs
index 993a490e0519538c37f1ca17d4cdab3686d87929..a5223b0a53268d31c1b1213602767c9c0c33afd1 100644
(file)
--- a/
test/pleroma/web/o_auth/app_test.exs
+++ b/
test/pleroma/web/o_auth/app_test.exs
@@
-1,9
+1,9
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.OAuth.AppTest do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.OAuth.AppTest do
- use Pleroma.DataCase
+ use Pleroma.DataCase
, async: true
alias Pleroma.Web.OAuth.App
import Pleroma.Factory
alias Pleroma.Web.OAuth.App
import Pleroma.Factory
@@
-41,4
+41,16
@@
defmodule Pleroma.Web.OAuth.AppTest do
assert error.type == :unique
end
end
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
end