package app import ( "net/http" "net/http/httptest" "testing" "github.com/stretchr/testify/assert" "gitlab.com/mokhax/sparkled/pkg/test" ) func TestApp(t *testing.T) { t.Run("New", func(t *testing.T) { server := New() 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) }) }) }