commit: 766011544a0142299598b341e8495e37be7db9da
parent cb1b52d980e23c7d4f06dda5891bd2cbbdafeb95
Author: Lain Soykaf <lain@lain.com>
Date: Fri, 15 Dec 2023 10:01:31 +0400
UserViewTest: Add basice service actor test.
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/test/pleroma/web/activity_pub/views/user_view_test.exs b/test/pleroma/web/activity_pub/views/user_view_test.exs
@@ -76,6 +76,15 @@ defmodule Pleroma.Web.ActivityPub.UserViewTest do
assert %{"invisible" => true} = UserView.render("service.json", %{user: user})
end
+ test "service has a few essential fields" do
+ user = insert(:user)
+ result = UserView.render("service.json", %{user: user})
+ assert result["id"]
+ assert result["type"] == "Application"
+ assert result["inbox"]
+ assert result["outbox"]
+ end
+
test "renders AKAs" do
akas = ["https://i.tusooa.xyz/users/test-pleroma"]
user = insert(:user, also_known_as: akas)