fix: fix failing JWT tests because of bad version regex.

This commit is contained in:
James Harton 2023-03-07 09:51:33 +13:00
parent 6905fa069c
commit 0cd431d4d0

View file

@ -40,7 +40,7 @@ defmodule AshAuthentication.JwtTest do
assert {:ok, _} = Version.parse_requirement(claims["aud"])
assert claims["exp"] > now
assert_in_delta(claims["iat"], now, 1.5)
assert claims["iss"] =~ ~r/^AshAuthentication v\d\.\d\.\d$/
assert claims["iss"] =~ ~r/^AshAuthentication v\d+\.\d+\.\d+$/
assert claims["jti"] =~ ~r/^[0-9a-z]+$/
assert_in_delta(claims["nbf"], now, 1.5)
assert claims["sub"] == "user?id=#{user.id}"