test(federation): fix APControllerTest failing because of datetime different when we reach 2nd page

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-06-20 17:40:50 +02:00
parent f749518bf7
commit a1f5d1dacc
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -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