Add support for setting language in instance metadata (#183)
[akkoma] / test / pleroma / web / mastodon_api / controllers / filter_controller_test.exs
index 90aa9398f9aaebe0f81a954f71185002fcd62531..66f7ed5793877a5948cd7ed6425ff681ddd4ead2 100644 (file)
@@ -67,9 +67,11 @@ defmodule Pleroma.Web.MastodonAPI.FilterControllerTest 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)