diff options
author | tusooa <tusooa@kazv.moe> | 2022-07-21 21:27:16 +0000 |
---|---|---|
committer | tusooa <tusooa@kazv.moe> | 2022-07-21 21:27:16 +0000 |
commit | c589b8445f1479b25d31984176f3741def83bcaa (patch) | |
tree | b8cffef4185d56eb03b12d92d6ce641481b68d76 /test | |
parent | 454f892f37d7a940068f560583a5cf4f6fd28124 (diff) | |
parent | 4350a205a4251760773b7ade75c882f4295d6cb0 (diff) | |
download | pleroma-c589b8445f1479b25d31984176f3741def83bcaa.tar.gz pleroma-c589b8445f1479b25d31984176f3741def83bcaa.zip |
Merge branch 'birthday_fix' into 'develop'
Allow to unset birthday
See merge request pleroma/pleroma!3702
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/mastodon_api/update_credentials_test.exs | 14 |
1 files changed, 14 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 c2e4debc8..f5211a60e 100644 --- a/test/pleroma/web/mastodon_api/update_credentials_test.exs +++ b/test/pleroma/web/mastodon_api/update_credentials_test.exs @@ -390,6 +390,20 @@ defmodule Pleroma.Web.MastodonAPI.UpdateCredentialsTest do assert user_data["source"]["pleroma"]["show_birthday"] == true end + test "unsets birth date", %{conn: conn} do + patch(conn, "/api/v1/accounts/update_credentials", %{ + "birthday" => "2001-02-12" + }) + + res = + patch(conn, "/api/v1/accounts/update_credentials", %{ + "birthday" => "" + }) + + assert user_data = json_response_and_validate_schema(res, 200) + assert user_data["pleroma"]["birthday"] == nil + end + test "emojis in fields labels", %{conn: conn} do fields = [ %{"name" => ":firefox:", "value" => "is best 2hu"}, |