menu_suite_test.go
616 字节
package menu
import (
"net/http"
"net/http/httptest"
"testing"
"github.com/beego/beego/v2/server/web"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
_ "gitlab.fjmaimaimai.com/mmm-go-pp/terms/pkg/infrastructure/pg"
_ "gitlab.fjmaimaimai.com/mmm-go-pp/terms/pkg/port/beego"
)
func TestMenu(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Beego Port Menu Correlations Test Case Suite")
}
var handler http.Handler
var server *httptest.Server
var _ = BeforeSuite(func() {
handler = web.BeeApp.Handlers
server = httptest.NewServer(handler)
})
var _ = AfterSuite(func() {
server.Close()
})