tsk-14: Fix startup crash (#16)

Closes #14

Reviewed-on: phoenix/textsender-auth#16
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
phoenix
2025-11-14 17:35:57 +00:00
committed by phoenix
parent ef39949e77
commit 6f608b757c
8 changed files with 48 additions and 60 deletions
-10
View File
@@ -1,7 +1,6 @@
package handler
import (
"context"
"encoding/json"
"net/http"
"net/http/httptest"
@@ -10,7 +9,6 @@ import (
"github.com/stretchr/testify/assert"
"git.kundeng.us/phoenix/textsender-auth/internal/db"
"git.kundeng.us/phoenix/textsender-auth/internal/handler/endpoint"
)
@@ -34,11 +32,3 @@ func TestCreateUserWithMock(t *testing.T) {
assert.NotNil(t, response.Data[0].Id, "Id should not be nil")
}
func resetTestDB(t *testing.T) {
t.Helper()
_, err := db.Pool.Exec(context.Background(), "DELETE FROM users")
if err != nil {
t.Fatalf("Failed to reset test database: %v", err)
}
}