Add TestDialRedirect

pull/39/head
178inaba 2017-04-23 18:46:41 +09:00
parent 2379baeb24
commit f0857503d1
1 changed files with 8 additions and 0 deletions

View File

@ -156,6 +156,14 @@ func wsTest(t *testing.T, q chan Event, cancel func()) {
}
}
func TestDialRedirect(t *testing.T) {
client := NewClient(&Config{})
_, err := client.dialRedirect(":")
if err == nil {
t.Fatalf("should be fail: %v", err)
}
}
func TestDial(t *testing.T) {
canErr := true
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {