diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-08-07 16:35:15 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-08-07 16:35:15 -0500 |
commit | 1a5a7ba6e8a936d3138ca530d3466111e542aef6 (patch) | |
tree | c056138ee21661af45d2363ce01282aafffb3fc0 /test/web/oauth/app_test.exs | |
parent | bd1e2e3a58ebd702306e7a6e2df985ac07e5f7d8 (diff) | |
parent | 47698fc322da58894dd41c1bfd5ca0376200dc5e (diff) | |
download | pleroma-1a5a7ba6e8a936d3138ca530d3466111e542aef6.tar.gz pleroma-1a5a7ba6e8a936d3138ca530d3466111e542aef6.zip |
Merge remote-tracking branch 'upstream/develop' into aliases
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 |