Fix auth token expiration test failures.

This commit is contained in:
mikestefanello 2022-04-12 21:05:19 -04:00
parent 5c51b72757
commit 0ca3c2b701

View File

@ -69,10 +69,10 @@ func TestAuthClient_GetValidPasswordToken(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, pt.ID, pt2.ID)
// Expire the token by pushed the date far enough back
// Expire the token by pushing the date far enough back
_, err = c.ORM.PasswordToken.
Update().
SetCreatedAt(time.Now().Add(-(c.Config.App.PasswordToken.Expiration + 10))).
SetCreatedAt(time.Now().Add(-(c.Config.App.PasswordToken.Expiration + 3600))).
Where(passwordtoken.ID(pt.ID)).
Save(context.Background())
require.NoError(t, err)