From 887d212288db292dbbc557191ef1507b70ca8507 Mon Sep 17 00:00:00 2001 From: RanXom Date: Mon, 13 Jul 2026 19:30:02 +0530 Subject: refactor(api): abstract thumbnail generator --- internal/api/api_test.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 internal/api/api_test.go (limited to 'internal/api/api_test.go') diff --git a/internal/api/api_test.go b/internal/api/api_test.go new file mode 100644 index 0000000..3940f6e --- /dev/null +++ b/internal/api/api_test.go @@ -0,0 +1,27 @@ +package api + +import ( + "net/http" + "net/http/httptest" + "testing" +) + +func TestHealth(t *testing.T) { + server := New(Config{ + Address: ":0", + }) + + req := httptest.NewRequest( + http.MethodGet, + "/health", + nil, + ) + + rec := httptest.NewRecorder() + + server.mux.ServeHTTP(rec, req) + + if rec.Code != http.StatusOK { + t.Fatalf("expected 200, got %d", rec.Code) + } +} -- cgit v1.2.3