12345678910111213141516171819202122232425262728293031 |
- package complete
- import (
- "net/http"
- "testing"
- "github.com/cryptix/exp/multiModulePage/router"
- "github.com/cryptix/go/http/tester"
- )
- var (
- testMux *http.ServeMux
- testClient *tester.Tester
- testRouter = router.CompleteApp()
- )
- func setup(t *testing.T) {
- testMux = http.NewServeMux()
- h, err := Handler(testRouter)
- if err != nil {
- t.Fatalf("handler setup failed: %s", err)
- }
- testMux.Handle("/", h)
- testClient = tester.New(testMux, t)
- }
- func teardown() {
- testMux = nil
- testClient = nil
- }
|