aboutsummaryrefslogtreecommitdiff
path: root/internal/api/api_test.go
diff options
context:
space:
mode:
authorRanXom <saiyedshizain@gmail.com>2026-07-13 19:30:02 +0530
committerRanXom <saiyedshizain@gmail.com>2026-07-13 19:30:02 +0530
commit887d212288db292dbbc557191ef1507b70ca8507 (patch)
treee7dfc90890555d91f8495443deb948033e693d7b /internal/api/api_test.go
parent87c5ba8c5f859fd26a038f6a704e856167c78758 (diff)
downloadgalleryd-887d212288db292dbbc557191ef1507b70ca8507.tar.xz
galleryd-887d212288db292dbbc557191ef1507b70ca8507.zip
refactor(api): abstract thumbnail generator
Diffstat (limited to 'internal/api/api_test.go')
-rw-r--r--internal/api/api_test.go27
1 files changed, 27 insertions, 0 deletions
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)
+ }
+}