mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 02:05:12 +00:00
Merge branch 'add-test-update_credentials' into 'develop'
Add a test for accounts/update_credentials See merge request pleroma/pleroma!2330
This commit is contained in:
commit
d96139f789
|
@ -118,6 +118,18 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
|
||||||
assert user_data["pleroma"]["hide_followers"] == true
|
assert user_data["pleroma"]["hide_followers"] == true
|
||||||
end
|
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
|
test "updates the user's hide_followers_count and hide_follows_count", %{conn: conn} do
|
||||||
conn =
|
conn =
|
||||||
patch(conn, "/api/v1/accounts/update_credentials", %{
|
patch(conn, "/api/v1/accounts/update_credentials", %{
|
||||||
|
|
Loading…
Reference in a new issue