feat(scaffold): add main_test.go [skip ci]

This commit is contained in:
2026-05-06 13:06:26 +00:00
parent dc1ae04a15
commit a13242bc87

16
main_test.go Normal file
View File

@@ -0,0 +1,16 @@
package main
import (
"net/http"
"net/http/httptest"
"testing"
)
func TestHealth(t *testing.T) {
req := httptest.NewRequest(http.MethodGet, "/health", nil)
rec := httptest.NewRecorder()
healthHandler(rec, req)
if rec.Code != http.StatusOK {
t.Fatalf("expected 200, got %d", rec.Code)
}
}