package restserver import ( "net/http" "net/http/httptest" "testing" "github.com/stretchr/testify/assert" ) func Test_RestServer_Hendler_Hello(t *testing.T) { r := New(NewConfig()) rec := httptest.NewRecorder() req, _ := http.NewRequest(http.MethodGet, "/hello", nil) r.HandleHello().ServeHTTP(rec, req) assert.Equal(t, rec.Body.String(), "TEsts Hello") }