commit: 69800055f1c78c4d45d52ceb111fb717f62a2599
parent d8b76c79f274c863e7464f62bf3b71aaa54174ce
Author: lain <lain@soykaf.club>
Date: Tue, 10 Sep 2019 18:53:41 +0000
Merge branch 'fix/tests' into 'develop'
Fix tests for `Activity.all_by_ids_with_object/1`
See merge request pleroma/pleroma!1652
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git 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