|
|
@@ -120,7 +120,7 @@ func TestGetAction(t *testing.T) {
|
|
|
wantURL := baseWantURL
|
|
|
wantURL.RawQuery = tt.wantQuery
|
|
|
|
|
|
- err := assertResponse(got, wantURL, wantHeader, nil)
|
|
|
+ err := assertRequest(got, wantURL, wantHeader, nil)
|
|
|
if err != nil {
|
|
|
t.Errorf("#%d: %v", i, err)
|
|
|
}
|
|
|
@@ -169,7 +169,7 @@ func TestWaitAction(t *testing.T) {
|
|
|
wantURL := baseWantURL
|
|
|
wantURL.RawQuery = tt.wantQuery
|
|
|
|
|
|
- err := assertResponse(got, wantURL, wantHeader, nil)
|
|
|
+ err := assertRequest(got, wantURL, wantHeader, nil)
|
|
|
if err != nil {
|
|
|
t.Errorf("#%d: %v", i, err)
|
|
|
}
|
|
|
@@ -298,13 +298,13 @@ func TestSetAction(t *testing.T) {
|
|
|
}
|
|
|
|
|
|
got := tt.act.HTTPRequest(url.URL{Scheme: "http", Host: "example.com"})
|
|
|
- if err := assertResponse(*got, u, wantHeader, []byte(tt.wantBody)); err != nil {
|
|
|
+ if err := assertRequest(*got, u, wantHeader, []byte(tt.wantBody)); err != nil {
|
|
|
t.Errorf("#%d: %v", i, err)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func assertResponse(got http.Request, wantURL *url.URL, wantHeader http.Header, wantBody []byte) error {
|
|
|
+func assertRequest(got http.Request, wantURL *url.URL, wantHeader http.Header, wantBody []byte) error {
|
|
|
if !reflect.DeepEqual(wantURL, got.URL) {
|
|
|
return fmt.Errorf("want.URL=%#v got.URL=%#v", wantURL, got.URL)
|
|
|
}
|