diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2020-08-05 17:46:24 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2020-08-05 17:46:24 +0300 |
commit | 2299bfe4c19697e7c0250e052d3496533595c58b (patch) | |
tree | 798b789f4cf68be68658765af0547b908640f271 /test/web/oauth/app_test.exs | |
parent | 97b57014496003cabb416766457552ef854fa658 (diff) | |
parent | 474aba984f2184d4f028c56f687d1a12f69d5c47 (diff) | |
download | pleroma-2299bfe4c19697e7c0250e052d3496533595c58b.tar.gz pleroma-2299bfe4c19697e7c0250e052d3496533595c58b.zip |
Merge branch 'develop' into refactor/config-get
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 |