From a1f5d1daccaf6a47bfb9e72a1963ed994d46f00d Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 20 Jun 2023 17:40:50 +0200 Subject: [PATCH] test(federation): fix APControllerTest failing because of datetime different when we reach 2nd page Signed-off-by: Thomas Citharel --- test/web/controllers/activity_pub_controller_test.exs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/web/controllers/activity_pub_controller_test.exs b/test/web/controllers/activity_pub_controller_test.exs index d44ddeefa..e9cf2101f 100644 --- a/test/web/controllers/activity_pub_controller_test.exs +++ b/test/web/controllers/activity_pub_controller_test.exs @@ -262,11 +262,16 @@ defmodule Mobilizon.Web.ActivityPubControllerTest do conn |> get(Actor.build_url(actor.preferred_username, :outbox, page: 0)) |> json_response(200) + |> Map.get("orderedItems") + # Published time can be different while we reach the second page + |> Enum.map(&Map.drop(&1, ["published"])) page_1_result = conn |> get(Actor.build_url(actor.preferred_username, :outbox, page: 1)) |> json_response(200) + |> Map.get("orderedItems") + |> Enum.map(&Map.drop(&1, ["published"])) assert page_0_result == page_1_result end