Initial commit
CI / test (push) Canceled after 0s

This commit is contained in:
2026-09-12 22:22:17 +02:00
commit 904d14b64c
314 changed files with 31884 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
package web
import (
"net/http"
"net/http/httptest"
"testing"
)
func TestPing(t *testing.T) {
app := newTestApplication(t)
request := httptest.NewRequest(http.MethodGet, "/ping", nil)
response := httptest.NewRecorder()
app.routes().ServeHTTP(response, request)
if response.Code != http.StatusOK {
t.Errorf("status: got %d, want %d", response.Code, http.StatusOK)
}
if body := response.Body.String(); body != "OK" {
t.Errorf("body: got %q, want %q", body, "OK")
}
}