1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-02-09 13:46:51 +02:00
oauth2-proxy/pkg/middleware/middleware_suite_test.go

25 lines
474 B
Go
Raw Normal View History

2020-06-14 16:42:05 +01:00
package middleware
import (
"net/http"
2020-06-14 16:42:05 +01:00
"testing"
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/logger"
2020-06-14 16:42:05 +01:00
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
func TestMiddlewareSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
2020-06-14 16:42:05 +01:00
RegisterFailHandler(Fail)
RunSpecs(t, "Middleware")
}
func testHandler() http.Handler {
return http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
rw.Write([]byte("test"))
})
}