Browse Source

Merge remote-tracking branch 'remotes/origin/develop' into relations-preloading-for-statuses-rendering

feature/add-subject-to-text-search
Ivan Tashkinov 4 years ago
parent
commit
ff1baae7e9
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs

+ 12
- 0
test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs View File

@@ -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", %{


Loading…
Cancel
Save