Treat any present value in "no_attachment_links" as true
[akkoma] / test / activity_test.exs
index ce6eb15451f7ad7ba6b126d41a9d034b007532ae..cf27fbbc50bf4e054675ee210c6136d709b3761a 100644 (file)
@@ -1,3 +1,7 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
 defmodule Pleroma.ActivityTest do
   use Pleroma.DataCase
   import Pleroma.Factory
@@ -15,4 +19,13 @@ defmodule Pleroma.ActivityTest do
 
     assert activity == found_activity
   end
+
+  test "returns the activity that created an object" do
+    activity = insert(:note_activity)
+
+    found_activity =
+      Pleroma.Activity.get_create_activity_by_object_ap_id(activity.data["object"]["id"])
+
+    assert activity == found_activity
+  end
 end