Merge branch 'fix/normalize-file-extension' into 'develop'
[akkoma] / test / web / activity_pub / activity_pub_controller_test.exs
index 25b47ee31db4e3c32e9c91d698bded388de44542..bbf89136b1b8ee786d6e3e96fcb1395a6f9b1b59 100644 (file)
@@ -32,6 +32,18 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
 
       assert json_response(conn, 200) == ObjectView.render("object.json", %{object: note})
     end
+
+    test "it returns 404 for non-public messages", %{conn: conn} do
+      note = insert(:direct_note)
+      uuid = String.split(note.data["id"], "/") |> List.last()
+
+      conn =
+        conn
+        |> put_req_header("accept", "application/activity+json")
+        |> get("/objects/#{uuid}")
+
+      assert json_response(conn, 404)
+    end
   end
 
   describe "/users/:nickname/inbox" do