1
0
mirror of https://github.com/golang/go synced 2024-11-19 21:04:43 -07:00

net/http: Minor fix to error messages in test.

Change-Id: I995ac0559f89110662d79d136d710ef3a0bb1505
Reviewed-on: https://go-review.googlesource.com/18351
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Michael McGreevy 2016-01-07 13:32:46 +11:00 committed by Brad Fitzpatrick
parent f962fc0820
commit 002e658a91

View File

@ -2685,7 +2685,7 @@ func TestHeaderToWire(t *testing.T) {
return errors.New("header appeared from after WriteHeader") return errors.New("header appeared from after WriteHeader")
} }
if !strings.Contains(got, "Content-Type: some/type") { if !strings.Contains(got, "Content-Type: some/type") {
return errors.New("wrong content-length") return errors.New("wrong content-type")
} }
return nil return nil
}, },
@ -2698,7 +2698,7 @@ func TestHeaderToWire(t *testing.T) {
}, },
check: func(got string) error { check: func(got string) error {
if !strings.Contains(got, "Content-Type: text/html") { if !strings.Contains(got, "Content-Type: text/html") {
return errors.New("wrong content-length; want html") return errors.New("wrong content-type; want html")
} }
return nil return nil
}, },
@ -2711,7 +2711,7 @@ func TestHeaderToWire(t *testing.T) {
}, },
check: func(got string) error { check: func(got string) error {
if !strings.Contains(got, "Content-Type: some/type") { if !strings.Contains(got, "Content-Type: some/type") {
return errors.New("wrong content-length; want html") return errors.New("wrong content-type; want html")
} }
return nil return nil
}, },
@ -2722,7 +2722,7 @@ func TestHeaderToWire(t *testing.T) {
}, },
check: func(got string) error { check: func(got string) error {
if !strings.Contains(got, "Content-Type: text/plain") { if !strings.Contains(got, "Content-Type: text/plain") {
return errors.New("wrong content-length; want text/plain") return errors.New("wrong content-type; want text/plain")
} }
if !strings.Contains(got, "Content-Length: 0") { if !strings.Contains(got, "Content-Length: 0") {
return errors.New("want 0 content-length") return errors.New("want 0 content-length")