diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/mastodon_api/update_credentials_test.exs | 10 | ||||
-rw-r--r-- | test/pleroma/web/mastodon_api/views/account_view_test.exs | 5 |
2 files changed, 14 insertions, 1 deletions
diff --git a/test/pleroma/web/mastodon_api/update_credentials_test.exs b/test/pleroma/web/mastodon_api/update_credentials_test.exs index ed1921c91..58bab9f46 100644 --- a/test/pleroma/web/mastodon_api/update_credentials_test.exs +++ b/test/pleroma/web/mastodon_api/update_credentials_test.exs @@ -180,6 +180,16 @@ defmodule Pleroma.Web.MastodonAPI.UpdateCredentialsTest do assert refresh_record(user).skip_thread_containment end + test "updates the user's show_attachment_filenames option", %{user: user, conn: conn} do + response = + conn + |> patch("/api/v1/accounts/update_credentials", %{show_attachment_filenames: "true"}) + |> json_response_and_validate_schema(200) + + assert response["pleroma"]["show_attachment_filenames"] + assert refresh_record(user).show_attachment_filenames + end + test "updates the user's hide_follows status", %{conn: conn} do conn = patch(conn, "/api/v1/accounts/update_credentials", %{hide_follows: "true"}) diff --git a/test/pleroma/web/mastodon_api/views/account_view_test.exs b/test/pleroma/web/mastodon_api/views/account_view_test.exs index 139e32362..46938aec5 100644 --- a/test/pleroma/web/mastodon_api/views/account_view_test.exs +++ b/test/pleroma/web/mastodon_api/views/account_view_test.exs @@ -35,7 +35,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do "<script src=\"invalid-html\"></script><span>valid html</span>. a<br>b<br/>c<br >d<br />f '&<>\"", inserted_at: ~N[2017-08-15 15:47:06.597036], emoji: %{"karjalanpiirakka" => "/file.png"}, - raw_bio: "valid html. a\nb\nc\nd\nf '&<>\"" + raw_bio: "valid html. a\nb\nc\nd\nf '&<>\"", + show_attachment_filenames: true }) expected = %{ @@ -87,6 +88,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do hide_followers_count: false, hide_follows_count: false, relationship: %{}, + show_attachment_filenames: true, skip_thread_containment: false, accepts_chat_messages: nil } @@ -185,6 +187,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do hide_followers_count: false, hide_follows_count: false, relationship: %{}, + show_attachment_filenames: false, skip_thread_containment: false, accepts_chat_messages: nil } |