diff options
author | Mark Felder <feld@FreeBSD.org> | 2020-08-07 14:55:22 -0500 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2020-08-07 14:55:22 -0500 |
commit | 54e2af829377b3f21823548e5612bbbb41550432 (patch) | |
tree | 0ad164ee09bba1a82560d192d71d14033f70b195 /test/web/oauth/app_test.exs | |
parent | 474147a67a89f8bd92186dbda93d78d8e2045d52 (diff) | |
parent | 39ca4a23c6c4a6cac9b277b8473ab9040a250e68 (diff) | |
download | pleroma-54e2af829377b3f21823548e5612bbbb41550432.tar.gz pleroma-54e2af829377b3f21823548e5612bbbb41550432.zip |
Merge branch 'develop' into fix/ldap-auth-issues
Diffstat (limited to 'test/web/oauth/app_test.exs')
-rw-r--r-- | test/web/oauth/app_test.exs | 11 |
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 |