diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-03-25 20:41:17 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-03-25 20:41:17 +0300 |
commit | ff1baae7e95c00e341f0f86427c4dab207e3eddc (patch) | |
tree | bba24c32d71da5f0de13f0e24638098146c3e7c8 | |
parent | 460e41585c2cd3f137c0f80173da60167fb318bf (diff) | |
parent | d96139f78924c5607cd218ea5432a9b80a6301ea (diff) | |
download | pleroma-ff1baae7e95c00e341f0f86427c4dab207e3eddc.tar.gz |
Merge remote-tracking branch 'remotes/origin/develop' into relations-preloading-for-statuses-rendering
-rw-r--r-- | test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs b/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs index 51cebe567..b693c1a47 100644 --- a/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs +++ b/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs @@ -118,6 +118,18 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do assert user_data["pleroma"]["hide_followers"] == true end + test "updates the user's discoverable status", %{conn: conn} do + assert %{"source" => %{"pleroma" => %{"discoverable" => true}}} = + conn + |> patch("/api/v1/accounts/update_credentials", %{discoverable: "true"}) + |> json_response(:ok) + + assert %{"source" => %{"pleroma" => %{"discoverable" => false}}} = + conn + |> patch("/api/v1/accounts/update_credentials", %{discoverable: "false"}) + |> json_response(:ok) + end + test "updates the user's hide_followers_count and hide_follows_count", %{conn: conn} do conn = patch(conn, "/api/v1/accounts/update_credentials", %{ |