Merge branch 'remove-info-from-users' into 'develop'
[akkoma] / test / web / mastodon_api / views / account_view_test.exs
index 15bfcbb78ccec56c0be9025178af76846dbc6582..d147079ab603f3e2b2592c25dfaa2eda2feb045b 100644 (file)
@@ -375,6 +375,14 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
     refute result.display_name == "<marquee> username </marquee>"
   end
 
+  test "never display nil user follow counts" do
+    user = insert(:user, following_count: 0, follower_count: 0)
+    result = AccountView.render("show.json", %{user: user})
+
+    assert result.following_count == 0
+    assert result.followers_count == 0
+  end
+
   describe "hiding follows/following" do
     test "shows when follows/followers stats are hidden and sets follow/follower count to 0" do
       user =