Files
bruno/packages/bruno-tests/collection/scripting/api/res/setBody/boolean.bru

34 lines
361 B
Plaintext

meta {
name: boolean
type: http
seq: 7
}
post {
url: {{host}}/api/echo/json
body: json
auth: none
}
body:json {
{
"hello": "bruno"
}
}
assert {
res.status: eq 200
}
script:post-response {
res.setBody(true)
}
tests {
test("res.setBody(boolean)", function() {
const body = res.getBody();
expect(body).to.be.true;
});
}