iris/httptest/server.go
Muhammad Hasan Alasady c1fa064d98
Added support for third party packages on httptest package with tests & example. (#1992)
* Added support for third party packages on httptest package with tests.

* Update httptest.go

Co-authored-by: Gerasimos (Makis) Maropoulos <kataras2006@hotmail.com>
2022-10-22 18:02:55 +03:00

18 lines
339 B
Go

package httptest
import (
"github.com/kataras/iris/v12"
"net/http/httptest"
)
// 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)
}