add leniency to expiry
This commit is contained in:
parent
ca737a220f
commit
14a69a0914
1 changed files with 4 additions and 2 deletions
|
@ -67,9 +67,11 @@ test "a filter with expires_in", %{conn: conn, user: user} do
|
||||||
expires_at =
|
expires_at =
|
||||||
NaiveDateTime.utc_now()
|
NaiveDateTime.utc_now()
|
||||||
|> NaiveDateTime.add(in_seconds)
|
|> 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)
|
filter = Filter.get(response["id"], user)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue