Add error messages for repeated follows and unfollows
[akkoma] / test / web / activity_pub / activity_pub_test.exs
index 0e778d8877e091a75b1463ab182e52aa28ba3b0c..2c6f67621d23a6220e4c494e65bbf9d3284e1da5 100644 (file)
@@ -25,7 +25,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
       assert activity.data["id"] == given_id
     end
 
-    test "adds an id to a given object if it lacks one" do
+    test "adds an id to a given object if it lacks one and inserts it to the object database" do
       data = %{
         "object" => %{
           "ok" => true
@@ -34,6 +34,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
 
       {:ok, %Activity{} = activity} = ActivityPub.insert(data)
       assert is_binary(activity.data["object"]["id"])
+      assert %Object{} = Object.get_by_ap_id(activity.data["object"]["id"])
     end
   end