diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2019-09-12 22:15:43 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-09-12 22:15:43 +0300 |
commit | 936951826e689eecbe26ae4828aa5f9152d3e1b4 (patch) | |
tree | 9822f65f99e76a4af6d4faea525330b2cf2f82f5 /test/activity_test.exs | |
parent | 007e0c1ce158bdfc11738a194944534837ae0258 (diff) | |
parent | 50269e9cacdbb7834c31fc7ad9872b68977e9f10 (diff) | |
download | pleroma-936951826e689eecbe26ae4828aa5f9152d3e1b4.tar.gz pleroma-936951826e689eecbe26ae4828aa5f9152d3e1b4.zip |
Merge branch 'develop' into test/activity_pub/transmogrifier.ex
Diffstat (limited to 'test/activity_test.exs')
-rw-r--r-- | test/activity_test.exs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/activity_test.exs b/test/activity_test.exs index 785c4b3cf..4152aaa7e 100644 --- a/test/activity_test.exs +++ b/test/activity_test.exs @@ -173,4 +173,16 @@ defmodule Pleroma.ActivityTest do |> where([a], a.activity_id == ^activity.id) |> Repo.one!() end + + test "all_by_ids_with_object/1" do + %{id: id1} = insert(:note_activity) + %{id: id2} = insert(:note_activity) + + activities = + [id1, id2] + |> Activity.all_by_ids_with_object() + |> Enum.sort(&(&1.id < &2.id)) + + assert [%{id: ^id1, object: %Object{}}, %{id: ^id2, object: %Object{}}] = activities + end end |