forked from mirrors/homebox
fix linter errors
This commit is contained in:
parent
39d8ff03f8
commit
b33ef5f029
14 changed files with 44 additions and 307 deletions
|
@ -34,8 +34,9 @@ func Test_EntAuthTokenRepo_CreateToken(t *testing.T) {
|
|||
assert.Equal(expiresAt, token.ExpiresAt)
|
||||
|
||||
// Cleanup
|
||||
testRepos.Users.Delete(ctx, userOut.ID)
|
||||
testRepos.AuthTokens.DeleteAll(ctx)
|
||||
assert.NoError(testRepos.Users.Delete(ctx, userOut.ID))
|
||||
_, err = testRepos.AuthTokens.DeleteAll(ctx)
|
||||
assert.NoError(err)
|
||||
}
|
||||
|
||||
func Test_EntAuthTokenRepo_GetUserByToken(t *testing.T) {
|
||||
|
@ -65,8 +66,9 @@ func Test_EntAuthTokenRepo_GetUserByToken(t *testing.T) {
|
|||
assert.Equal(userOut.Email, foundUser.Email)
|
||||
|
||||
// Cleanup
|
||||
testRepos.Users.Delete(ctx, userOut.ID)
|
||||
testRepos.AuthTokens.DeleteAll(ctx)
|
||||
assert.NoError(testRepos.Users.Delete(ctx, userOut.ID))
|
||||
_, err = testRepos.AuthTokens.DeleteAll(ctx)
|
||||
assert.NoError(err)
|
||||
}
|
||||
|
||||
func Test_EntAuthTokenRepo_PurgeExpiredTokens(t *testing.T) {
|
||||
|
@ -108,6 +110,7 @@ func Test_EntAuthTokenRepo_PurgeExpiredTokens(t *testing.T) {
|
|||
}
|
||||
|
||||
// Cleanup
|
||||
testRepos.Users.Delete(ctx, userOut.ID)
|
||||
testRepos.AuthTokens.DeleteAll(ctx)
|
||||
assert.NoError(testRepos.Users.Delete(ctx, userOut.ID))
|
||||
_, err = testRepos.AuthTokens.DeleteAll(ctx)
|
||||
assert.NoError(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue