1 defmodule Pleroma.ActivityTest do
6 test "returns an activity by it's AP id" do
7 activity = insert(:note_activity)
8 found_activity = Pleroma.Activity.get_by_ap_id(activity.data["id"])
10 assert activity == found_activity
13 test "returns activities by it's objects AP ids" do
14 activity = insert(:note_activity)
15 [found_activity] = Pleroma.Activity.all_by_object_ap_id(activity.data["object"]["id"])
17 assert activity == found_activity
20 test "returns the activity that created an object" do
21 activity = insert(:note_activity)
24 Pleroma.Activity.get_create_activity_by_object_ap_id(activity.data["object"]["id"])
26 assert activity == found_activity