mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
19 lines
340 B
Go
19 lines
340 B
Go
package httptest
|
|
|
|
import (
|
|
"net/http/httptest"
|
|
|
|
"github.com/kataras/iris/v12"
|
|
)
|
|
|
|
// NewServer is just a helper to create a new standard
|
|
// httptest.Server instance.
|
|
func NewServer(t IrisTesty, app *iris.Application) *httptest.Server {
|
|
if err := app.Build(); err != nil {
|
|
t.Fatal(err)
|
|
return nil
|
|
}
|
|
|
|
return httptest.NewServer(app)
|
|
}
|