//verify if successful transaction
assert jsonSlurper.body.message == "Approved"
对于“已批准”和“Aprobada”,我希望这是真的,这不起作用:
assert jsonSlurper.body.message IN ("Approved","Aprobada")
由于
答案 0 :(得分:3)
带有正确列表的小写in
也应该起作用
assert jsonSlurper.body.message in ["Approved","Aprobada"]
答案 1 :(得分:1)
我实际上得到了它:
assert jsonSlurper.body.message == "Approved" || jsonSlurper.body.message == "Aprobada"