Pipeline Ingestion: Note
[akkoma] / test / pleroma / web / static_fe / static_fe_controller_test.exs
index 19506f1d8622996fba7c26ede5def15051253bc6..5752cffda5f18b1f5c8fce7acbb787ed6eea234e 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.StaticFE.StaticFEControllerTest do
@@ -7,6 +7,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEControllerTest do
 
   alias Pleroma.Activity
   alias Pleroma.Web.ActivityPub.Transmogrifier
+  alias Pleroma.Web.ActivityPub.Utils
   alias Pleroma.Web.CommonAPI
 
   import Pleroma.Factory
@@ -185,16 +186,16 @@ defmodule Pleroma.Web.StaticFE.StaticFEControllerTest do
     test "302 for remote cached status", %{conn: conn, user: user} do
       message = %{
         "@context" => "https://www.w3.org/ns/activitystreams",
-        "to" => user.follower_address,
-        "cc" => "https://www.w3.org/ns/activitystreams#Public",
         "type" => "Create",
+        "actor" => user.ap_id,
         "object" => %{
+          "to" => user.follower_address,
+          "cc" => "https://www.w3.org/ns/activitystreams#Public",
+          "id" => Utils.generate_object_id(),
           "content" => "blah blah blah",
           "type" => "Note",
-          "attributedTo" => user.ap_id,
-          "inReplyTo" => nil
-        },
-        "actor" => user.ap_id
+          "attributedTo" => user.ap_id
+        }
       }
 
       assert {:ok, activity} = Transmogrifier.handle_incoming(message)