Change user.discoverable field to user.is_discoverable

This commit is contained in:
Mark Felder 2020-10-13 09:45:08 -05:00
commit 8bacdc3680
23 changed files with 52 additions and 37 deletions

View file

@ -147,14 +147,14 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
end
test "updates the user's discoverable status", %{conn: conn} do
assert %{"source" => %{"pleroma" => %{"discoverable" => true}}} =
assert %{"source" => %{"pleroma" => %{"is_discoverable" => true}}} =
conn
|> patch("/api/v1/accounts/update_credentials", %{discoverable: "true"})
|> patch("/api/v1/accounts/update_credentials", %{is_discoverable: "true"})
|> json_response_and_validate_schema(:ok)
assert %{"source" => %{"pleroma" => %{"discoverable" => false}}} =
assert %{"source" => %{"pleroma" => %{"is_discoverable" => false}}} =
conn
|> patch("/api/v1/accounts/update_credentials", %{discoverable: "false"})
|> patch("/api/v1/accounts/update_credentials", %{is_discoverable: "false"})
|> json_response_and_validate_schema(:ok)
end

View file

@ -1278,7 +1278,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
"note" => "",
"pleroma" => %{
"actor_type" => "Person",
"discoverable" => false,
"is_discoverable" => false,
"no_rich_text" => false,
"show_role" => true
},