diff options
author | Angelina Filippova <linakirsanova@gmail.com> | 2020-08-07 21:05:44 +0300 |
---|---|---|
committer | Angelina Filippova <linakirsanova@gmail.com> | 2020-08-07 21:05:44 +0300 |
commit | f21b6ebd5d71b77b1f2b7c8918005c3b70752c15 (patch) | |
tree | 7beddc568e0e1430ab6bc8fdbc4c6d9d04744d49 /test/web/oauth | |
parent | 8e1f7a3eff05a43f59f15dc6fa0483713e221fa7 (diff) | |
parent | 8e90cc58e7ec3f19f03d049ff541750f1ab4774e (diff) | |
download | pleroma-f21b6ebd5d71b77b1f2b7c8918005c3b70752c15.tar.gz pleroma-f21b6ebd5d71b77b1f2b7c8918005c3b70752c15.zip |
Merge branch 'feature/update-welcome-setting-in-description' of git.pleroma.social:pleroma/pleroma into feature/update-welcome-setting-in-description
Diffstat (limited to 'test/web/oauth')
-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 |