Files
snippetbox/cmd/web/handlers_test.go
lbenedar ec5ef9a5c1 ch14.4
2026-03-06 17:12:53 +03:00

21 lines
342 B
Go

package main
import (
"net/http"
"testing"
"gitea.local.lab/Lbenedar/snippetbox/internal/assert"
)
func TestPing(t *testing.T) {
app := newTestApplication(t)
ts := newTestServer(t, app.routes())
defer ts.Close()
statusCode, _, body := ts.get(t, "/ping")
assert.Equal(t, statusCode, http.StatusOK)
assert.Equal(t, body, "OK")
}