mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 10:27:06 +00:00
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>
This commit is contained in:
committed by
GitHub
parent
bdceab9342
commit
c1fa064d98
@@ -1,15 +1,13 @@
|
||||
package httptest
|
||||
|
||||
import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/kataras/iris/v12"
|
||||
"net/http/httptest"
|
||||
)
|
||||
|
||||
// NewServer is just a helper to create a new standard
|
||||
// httptest.Server instance.
|
||||
func NewServer(t *testing.T, app *iris.Application) *httptest.Server {
|
||||
func NewServer(t IrisTesty, app *iris.Application) *httptest.Server {
|
||||
if err := app.Build(); err != nil {
|
||||
t.Fatal(err)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user