53 lines
791 B
Text
53 lines
791 B
Text
meta {
|
|
name: three eqs
|
|
type: http
|
|
seq: 1
|
|
}
|
|
|
|
post {
|
|
url: {{API_BASE}}/query
|
|
body: json
|
|
auth: inherit
|
|
}
|
|
|
|
body:json {
|
|
[
|
|
{
|
|
"attribute": "capacity",
|
|
"operator": "=",
|
|
"value": "20"
|
|
},
|
|
{
|
|
"attribute": "heating",
|
|
"operator": "=",
|
|
"value": "false"
|
|
},
|
|
{
|
|
"attribute": "cooling",
|
|
"operator": "=",
|
|
"value": "true"
|
|
}
|
|
]
|
|
}
|
|
|
|
assert {
|
|
res.status: eq 200
|
|
res.body: length 1
|
|
}
|
|
|
|
tests {
|
|
test("Response body is a JSON array", function() {
|
|
expect(res.getBody()).to.be.an('array');
|
|
});
|
|
|
|
test("Array is not empty and contains Strings", function() {
|
|
const data = res.getBody();
|
|
expect(data[0]).to.be.a('string'); // data should be in string
|
|
});
|
|
|
|
}
|
|
|
|
settings {
|
|
encodeUrl: true
|
|
timeout: 0
|
|
}
|