summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortusooa <tusooa@kazv.moe>2023-11-05 18:49:31 -0500
committertusooa <tusooa@kazv.moe>2023-12-27 12:27:37 -0500
commit7a58ddfa486048d17fa653662914e0f02d11fadb (patch)
tree823eeef02bd7e95279699667ea58b7fe208327f2 /test
parent40f170f0a70eaf81f13bbe64964a98843a2ecaa9 (diff)
downloadpleroma-7a58ddfa486048d17fa653662914e0f02d11fadb.tar.gz
pleroma-7a58ddfa486048d17fa653662914e0f02d11fadb.zip
Allow local user to have group actor type
https://git.pleroma.social/pleroma/pleroma/-/issues/3205
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/mastodon_api/update_credentials_test.exs16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/pleroma/web/mastodon_api/update_credentials_test.exs b/test/pleroma/web/mastodon_api/update_credentials_test.exs
index fc8b79536..cf26cd9a6 100644
--- a/test/pleroma/web/mastodon_api/update_credentials_test.exs
+++ b/test/pleroma/web/mastodon_api/update_credentials_test.exs
@@ -732,4 +732,20 @@ defmodule Pleroma.Web.MastodonAPI.UpdateCredentialsTest do
assert account["source"]["pleroma"]["actor_type"] == "Person"
end
end
+
+ describe "Mark account as group" do
+ setup do: oauth_access(["write:accounts"])
+ setup :request_content_type
+
+ test "changing actor_type to Group makes account a Group and enables bot indicator for backward compatibility",
+ %{conn: conn} do
+ account =
+ conn
+ |> patch("/api/v1/accounts/update_credentials", %{actor_type: "Group"})
+ |> json_response_and_validate_schema(200)
+
+ assert account["bot"]
+ assert account["source"]["pleroma"]["actor_type"] == "Group"
+ end
+ end
end