refactor: adjust project structure
This commit is contained in:
		| @ -1,7 +1,7 @@ | ||||
| package services | ||||
| package service | ||||
| 
 | ||||
| import ( | ||||
| 	"health-go/routers" | ||||
| 	"health-go/router" | ||||
| 	"net/http" | ||||
| 	"net/http/httptest" | ||||
| 	"testing" | ||||
| @ -10,11 +10,11 @@ import ( | ||||
| ) | ||||
| 
 | ||||
| func TestPingRoute(t *testing.T) { | ||||
| 	router := routers.SetupRouter() | ||||
| 	r := router.SetupRouter() | ||||
| 
 | ||||
| 	w := httptest.NewRecorder() | ||||
| 	req, _ := http.NewRequest("GET", "/fetchHosList", nil) | ||||
| 	router.ServeHTTP(w, req) | ||||
| 	r.ServeHTTP(w, req) | ||||
| 
 | ||||
| 	assert.JSONEq(t, `{"code: 20"}`, w.Body.String()) | ||||
| } | ||||
		Reference in New Issue
	
	Block a user