Merge remote-tracking branch 'origin/develop' into feature/local-only-scope
[akkoma] / test / pleroma / web / activity_pub / activity_pub_test.exs
index 6ac883b2375d35e0ab311e4074faac1461afdecb..43bd14ee6f6de018089b9d8bd04ad37581340743 100644 (file)
@@ -2273,4 +2273,15 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
       assert length(activities) == 2
     end
   end
+
+  test "allow fetching of accounts with an empty string name field" do
+    Tesla.Mock.mock(fn
+      %{method: :get, url: "https://princess.cat/users/mewmew"} ->
+        file = File.read!("test/fixtures/mewmew_no_name.json")
+        %Tesla.Env{status: 200, body: file}
+    end)
+
+    {:ok, user} = ActivityPub.make_user_from_ap_id("https://princess.cat/users/mewmew")
+    assert user.name == " "
+  end
 end