Fix auth token expiration test failures.
This commit is contained in:
parent
5c51b72757
commit
0ca3c2b701
1 changed files with 2 additions and 2 deletions
|
|
@ -69,10 +69,10 @@ func TestAuthClient_GetValidPasswordToken(t *testing.T) {
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
assert.Equal(t, pt.ID, pt2.ID)
|
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.
|
_, err = c.ORM.PasswordToken.
|
||||||
Update().
|
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)).
|
Where(passwordtoken.ID(pt.ID)).
|
||||||
Save(context.Background())
|
Save(context.Background())
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue