github.com/mundipagg/boleto-api@v0.0.0-20230620145841-3f9ec742599f/healthcheck/healthcheck_test.go (about) 1 package healthcheck 2 3 import ( 4 "net/http" 5 "net/http/httptest" 6 "testing" 7 8 "github.com/gin-gonic/gin" 9 "github.com/stretchr/testify/assert" 10 ) 11 12 func TestPing(t *testing.T) { 13 writer := httptest.NewRecorder() 14 context, _ := gin.CreateTestContext(writer) 15 16 Ping(context) 17 18 assert.Equal(t, http.StatusOK, context.Writer.Status()) 19 }