refactor: adjust project structure

This commit is contained in:
2024-11-14 01:15:55 +08:00
parent c219d81b89
commit 70d7229dd8
20 changed files with 320 additions and 132 deletions

View File

@ -0,0 +1,20 @@
package service
import (
"health-go/router"
"net/http"
"net/http/httptest"
"testing"
"github.com/stretchr/testify/assert"
)
func TestPingRoute(t *testing.T) {
r := router.SetupRouter()
w := httptest.NewRecorder()
req, _ := http.NewRequest("GET", "/fetchHosList", nil)
r.ServeHTTP(w, req)
assert.JSONEq(t, `{"code: 20"}`, w.Body.String())
}