aboutsummaryrefslogtreecommitdiff
path: root/test/web/oauth/app_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-08-06 15:22:20 +0200
committerlain <lain@soykaf.club>2020-08-06 15:22:20 +0200
commitbf95dfb240cff8c5a2f8a0930e5309a09ca00ba1 (patch)
tree3a0c81155e7ae38e27008a7c066e8bc03fb1b410 /test/web/oauth/app_test.exs
parent532d6f94aea5d4f53e846b8b77296f80a9ae68a0 (diff)
parent10b0e55acffeeff5842421c12b3b26feb35336de (diff)
downloadpleroma-bf95dfb240cff8c5a2f8a0930e5309a09ca00ba1.tar.gz
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into frontend-bundles-downloads
Diffstat (limited to 'test/web/oauth/app_test.exs')
-rw-r--r--test/web/oauth/app_test.exs11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/web/oauth/app_test.exs b/test/web/oauth/app_test.exs
index 899af648e..993a490e0 100644
--- a/test/web/oauth/app_test.exs
+++ b/test/web/oauth/app_test.exs
@@ -29,5 +29,16 @@ defmodule Pleroma.Web.OAuth.AppTest do
assert exist_app.id == app.id
assert exist_app.scopes == ["read", "write", "follow", "push"]
end
+
+ test "has unique client_id" do
+ insert(:oauth_app, client_name: "", redirect_uris: "", client_id: "boop")
+
+ error =
+ catch_error(insert(:oauth_app, client_name: "", redirect_uris: "", client_id: "boop"))
+
+ assert %Ecto.ConstraintError{} = error
+ assert error.constraint == "apps_client_id_index"
+ assert error.type == :unique
+ end
end
end