1
0
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:
Muhammad Hasan Alasady
2022-10-22 18:02:55 +03:00
committed by GitHub
parent bdceab9342
commit c1fa064d98
8 changed files with 483 additions and 7 deletions

View File

@@ -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