From: Egor Kislitsyn Date: Tue, 10 Sep 2019 18:08:37 +0000 (+0700) Subject: Fix `Activity.all_by_ids_with_object/1` test X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=3d12e05f43763d3ebc693e69f3f945044939bcc2;p=akkoma Fix `Activity.all_by_ids_with_object/1` test --- diff --git a/test/activity_test.exs b/test/activity_test.exs index 49654bd67..4152aaa7e 100644 --- a/test/activity_test.exs +++ b/test/activity_test.exs @@ -178,7 +178,11 @@ defmodule Pleroma.ActivityTest do %{id: id1} = insert(:note_activity) %{id: id2} = insert(:note_activity) - assert [%{id: ^id1, object: %Object{}}, %{id: ^id2, object: %Object{}}] = - Activity.all_by_ids_with_object([id1, id2]) + 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