25 lines
		
	
	
		
			474 B
		
	
	
	
		
			Go
		
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			474 B
		
	
	
	
		
			Go
		
	
	
	
package middleware
 | 
						|
 | 
						|
import (
 | 
						|
	"net/http"
 | 
						|
	"testing"
 | 
						|
 | 
						|
	"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/logger"
 | 
						|
	. "github.com/onsi/ginkgo"
 | 
						|
	. "github.com/onsi/gomega"
 | 
						|
)
 | 
						|
 | 
						|
func TestMiddlewareSuite(t *testing.T) {
 | 
						|
	logger.SetOutput(GinkgoWriter)
 | 
						|
	logger.SetErrOutput(GinkgoWriter)
 | 
						|
 | 
						|
	RegisterFailHandler(Fail)
 | 
						|
	RunSpecs(t, "Middleware")
 | 
						|
}
 | 
						|
 | 
						|
func testHandler() http.Handler {
 | 
						|
	return http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
 | 
						|
		rw.Write([]byte("test"))
 | 
						|
	})
 | 
						|
}
 |