iris/httptest/server.go
Gerasimos (Makis) Maropoulos 70a73ef80b
publish v12.2.0-alpha7 version
2022-02-25 20:17:02 +02:00

20 lines
352 B
Go

package httptest
import (
"net/http/httptest"
"testing"
"github.com/kataras/iris/v12"
)
// NewServer is just a helper to create a new standard
// httptest.Server instance.
func NewServer(t *testing.T, app *iris.Application) *httptest.Server {
if err := app.Build(); err != nil {
t.Fatal(err)
return nil
}
return httptest.NewServer(app)
}