diff options
author | lain <lain@soykaf.club> | 2021-01-05 13:10:14 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2021-01-05 13:10:14 +0100 |
commit | e802b48d558ccd4a65a6da2bcc6dacb057b7fd09 (patch) | |
tree | 4444bcd2b26560d37e1e52ad6583d68c8d3f90f4 /test | |
parent | f0e6cff58365791f3bfa79117351ee2e705d1b6b (diff) | |
download | pleroma-e802b48d558ccd4a65a6da2bcc6dacb057b7fd09.tar.gz |
User: Use ObjectID type to validate also-known-as field
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/mastodon_api/update_credentials_test.exs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/pleroma/web/mastodon_api/update_credentials_test.exs b/test/pleroma/web/mastodon_api/update_credentials_test.exs index ff0147244..e3e437a19 100644 --- a/test/pleroma/web/mastodon_api/update_credentials_test.exs +++ b/test/pleroma/web/mastodon_api/update_credentials_test.exs @@ -228,6 +228,15 @@ defmodule Pleroma.Web.MastodonAPI.UpdateCredentialsTest do assert user_data["pleroma"]["also_known_as"] == ["https://mushroom.kingdom/users/mario"] end + test "doesn't update non-url akas", %{conn: conn} do + conn = + patch(conn, "/api/v1/accounts/update_credentials", %{ + "also_known_as" => ["aReallyCoolGuy"] + }) + + assert json_response_and_validate_schema(conn, 403) + end + test "updates the user's avatar", %{user: user, conn: conn} do new_avatar = %Plug.Upload{ content_type: "image/jpeg", |