tests: add test to ensure invisible actors are rendered with the invisible hint set...
authorAriadne Conill <ariadne@dereferenced.org>
Sat, 19 Oct 2019 17:53:52 +0000 (17:53 +0000)
committerAriadne Conill <ariadne@dereferenced.org>
Sat, 19 Oct 2019 23:21:37 +0000 (23:21 +0000)
test/web/activity_pub/views/user_view_test.exs

index 3155749aac87c9f21504b80763e89675a987e951..a31b4c92e15fc3532f044cf2f7eae718ebf4706b 100644 (file)
@@ -76,6 +76,12 @@ defmodule Pleroma.Web.ActivityPub.UserViewTest do
     assert result["image"]["url"] == "https://somebanner"
   end
 
+  test "renders an invisible user with the invisible property set to true" do
+    user = insert(:user, %{info: %{invisible: true}})
+
+    assert %{"invisible" => true} = UserView.render("service.json", %{user: user})
+  end
+
   describe "endpoints" do
     test "local users have a usable endpoints structure" do
       user = insert(:user)