Skip to content

Commit dd5ab5f

Browse files
adjust a few feedback messages
1 parent 2c8ffe1 commit dd5ab5f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

checks/http.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ func prettyPrintHTTPTest(test api.HTTPRequestTest, variables map[string]string)
133133
}
134134
if test.BodyContains != nil {
135135
interpolated := InterpolateVariables(*test.BodyContains, variables)
136-
return fmt.Sprintf("Expecting body to contain: %s", interpolated)
136+
return fmt.Sprintf("Expecting response body to contain: %s", interpolated)
137137
}
138138
if test.BodyContainsNone != nil {
139139
interpolated := InterpolateVariables(*test.BodyContainsNone, variables)
140-
return fmt.Sprintf("Expecting JSON body to not contain: %s", interpolated)
140+
return fmt.Sprintf("Expecting response body to not contain: %s", interpolated)
141141
}
142142
if test.HeadersContain != nil {
143143
interpolatedKey := InterpolateVariables(test.HeadersContain.Key, variables)

checks/local.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ func evaluateHTTPRequestTests(stepIndex int, req api.CLIStepHTTPRequest, result
120120
case test.BodyContains != nil:
121121
needle := InterpolateVariables(*test.BodyContains, result.Variables)
122122
if !strings.Contains(result.BodyString, needle) {
123-
err = fmt.Errorf("expected body to contain %q", needle)
123+
err = fmt.Errorf("expected response body to contain %q", needle)
124124
}
125125
case test.BodyContainsNone != nil:
126126
needle := InterpolateVariables(*test.BodyContainsNone, result.Variables)
127127
if strings.Contains(result.BodyString, needle) {
128-
err = fmt.Errorf("expected body to not contain %q", needle)
128+
err = fmt.Errorf("expected response body to not contain %q", needle)
129129
}
130130
case test.HeadersContain != nil:
131131
err = evaluateHeaderContains(result.ResponseHeaders, *test.HeadersContain, result.Variables, "header")

0 commit comments

Comments
 (0)