package routers import ( "github.com/stretchr/testify/assert" "net/http" "net/http/httptest" "testing" ) func TestPing(t *testing.T) { asserts := assert.New(t) router := InitRouter() w := httptest.NewRecorder() req, _ := http.NewRequest("GET", "/Api/V3/Ping", nil) router.ServeHTTP(w, req) assert.Equal(t, 200, w.Code) asserts.Contains(w.Body.String(), "Pong") }