From 2b3ca483c11ef7d6dcd02b84478a320d25591686 Mon Sep 17 00:00:00 2001 From: demo-bot Date: Sun, 2 Aug 2026 11:12:58 +0000 Subject: [PATCH] feat(scaffold): add main_test.go [skip ci] --- main_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 main_test.go diff --git a/main_test.go b/main_test.go new file mode 100644 index 0000000..81ce4df --- /dev/null +++ b/main_test.go @@ -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) + } +}