From: rinpatch Date: Sat, 14 Sep 2019 12:36:08 +0000 (+0000) Subject: Merge branch 'fix-tests' into 'develop' X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=c64ab84e6a4aef18d4d38d11d445777be09f8e00;p=akkoma Merge branch 'fix-tests' into 'develop' Fix `Activity.all_by_actor_and_id/2` test See merge request pleroma/pleroma!1668 (cherry picked from commit 3ae448b592214b43af1d079c997c6f6b91d31aeb) b870ae08 Fix `Activity.all_by_actor_and_id/2` test --- diff --git a/test/activity_test.exs b/test/activity_test.exs index f9f789a76..275cab81e 100644 --- a/test/activity_test.exs +++ b/test/activity_test.exs @@ -213,7 +213,11 @@ defmodule Pleroma.ActivityTest do assert [] == Activity.all_by_actor_and_id(user, []) - assert [%Activity{id: ^id2}, %Activity{id: ^id1}] = - Activity.all_by_actor_and_id(user.ap_id, [id1, id2]) + activities = + user.ap_id + |> Activity.all_by_actor_and_id([id1, id2]) + |> Enum.sort(&(&1.id < &2.id)) + + assert [%Activity{id: ^id1}, %Activity{id: ^id2}] = activities end end