From 0bef608297d7def2a18d054e7230fe0e0a3710a7 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sat, 12 Apr 2025 18:11:05 -0600 Subject: refactor: extract mountable interface to allow controllers to mount themselves into the mux --- pkg/web/server_test.go | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 pkg/web/server_test.go (limited to 'pkg/web/server_test.go') diff --git a/pkg/web/server_test.go b/pkg/web/server_test.go deleted file mode 100644 index fd3c0ad..0000000 --- a/pkg/web/server_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package web - -import ( - "net/http" - "net/http/httptest" - "testing" - - "github.com/stretchr/testify/assert" - "gitlab.com/mokhax/sparkled/pkg/db" - "gitlab.com/mokhax/sparkled/pkg/test" -) - -func TestServer(t *testing.T) { - server := New(db.NewRepository()) - - t.Run("GET /index.html", func(t *testing.T) { - t.Skip() - response := httptest.NewRecorder() - - server.ServeHTTP(response, test.Request("GET", "/")) - assert.Equal(t, http.StatusOK, response.Code) - assert.Contains(t, response.Body.String(), "SparkleLab") - }) - - t.Run("GET /health", func(t *testing.T) { - response := httptest.NewRecorder() - - server.ServeHTTP(response, test.Request("GET", "/health")) - assert.Equal(t, http.StatusOK, response.Code) - }) -} -- cgit v1.2.3