Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into feature/user-timeline
[akkoma] / test / activity_test.exs
1 defmodule Pleroma.ActivityTest do
2 use Pleroma.DataCase
3 import Pleroma.Factory
4
5 test "returns an activity by it's AP id" do
6 activity = insert(:note_activity)
7 found_activity = Pleroma.Activity.get_by_ap_id(activity.data["id"])
8
9 assert activity == found_activity
10 end
11
12 test "returns activities by it's objects AP ids" do
13 activity = insert(:note_activity)
14 [found_activity] = Pleroma.Activity.all_by_object_ap_id(activity.data["object"]["id"])
15
16 assert activity == found_activity
17 end
18 end