refactor: post data with body

This commit is contained in:
debugtalk
2021-10-15 21:12:22 +08:00
parent 17035e1668
commit b0fe1e42af
14 changed files with 27 additions and 34 deletions

View File

@@ -39,7 +39,7 @@ var demoTestCase = &TestCase{
AssertEqual("body.args.foo2", "34.5", "check args foo2"), // notice: request params value will be converted to string
Step("post json data").
POST("/post").
WithJSON(map[string]interface{}{
WithBody(map[string]interface{}{
"foo1": "$varFoo1", // reference former extracted variable
"foo2": "${max($a, $b)}", // 12.3; step level variables are independent, variable b is 3.45 here
}).