mirror of
https://github.com/1f349/violet.git
synced 2024-11-23 11:51:37 +00:00
17 lines
371 B
Go
17 lines
371 B
Go
package proxy
|
|
|
|
import (
|
|
"github.com/stretchr/testify/assert"
|
|
"net/http"
|
|
"testing"
|
|
)
|
|
|
|
func TestNewHybridTransport(t *testing.T) {
|
|
h := NewHybridTransport(nil)
|
|
req, err := http.NewRequest(http.MethodGet, "https://example.com", nil)
|
|
assert.NoError(t, err)
|
|
trip, err := h.SecureRoundTrip(req)
|
|
assert.NoError(t, err)
|
|
assert.Equal(t, http.StatusOK, trip.StatusCode)
|
|
}
|