Skip to content

Commit 3884101

Browse files
authored
Add support for contains operator (#63)
* add support for contains op * bump version v.12.0
1 parent d5a5ebb commit 3884101

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Diff for: client/lessons.go

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ type OperatorType string
2424
const (
2525
OpEquals OperatorType = "eq"
2626
OpGreaterThan OperatorType = "gt"
27+
OpContains OperatorType = "contains"
2728
)
2829

2930
type HTTPTestJSONValue struct {

Diff for: render/http.go

+2
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ func prettyPrintHTTPTest(test api.HTTPTest, variables map[string]string) string
272272
op = "to be equal to"
273273
} else if test.JSONValue.Operator == api.OpGreaterThan {
274274
op = "to be greater than"
275+
} else if test.JSONValue.Operator == api.OpContains {
276+
op = "contains"
275277
}
276278
expecting := fmt.Sprintf("Expecting JSON at %v %s %v", test.JSONValue.Path, op, val)
277279
return checks.InterpolateVariables(expecting, variables)

Diff for: version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.11.1
1+
v1.12.0

0 commit comments

Comments
 (0)