diff --git a/test/pleroma/web/mastodon_api/controllers/filter_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/filter_controller_test.exs index 90aa9398f..66f7ed579 100644 --- a/test/pleroma/web/mastodon_api/controllers/filter_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/filter_controller_test.exs @@ -67,9 +67,11 @@ test "a filter with expires_in", %{conn: conn, user: user} do expires_at = NaiveDateTime.utc_now() |> NaiveDateTime.add(in_seconds) - |> Pleroma.Web.CommonAPI.Utils.to_masto_date() - assert response["expires_at"] == expires_at + assert NaiveDateTime.diff( + NaiveDateTime.from_iso8601!(response["expires_at"]), + expires_at + ) < 5 filter = Filter.get(response["id"], user)