mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-16 04:11:29 +00:00
36 lines
419 B
Plaintext
36 lines
419 B
Plaintext
meta {
|
|
name: object
|
|
type: http
|
|
seq: 1
|
|
}
|
|
|
|
post {
|
|
url: {{host}}/api/echo/json
|
|
body: json
|
|
auth: none
|
|
}
|
|
|
|
body:json {
|
|
{
|
|
"hello": "bruno"
|
|
}
|
|
}
|
|
|
|
assert {
|
|
res.status: eq 200
|
|
}
|
|
|
|
script:post-response {
|
|
res.setBody({
|
|
hello : "hello from post-res"
|
|
})
|
|
}
|
|
|
|
tests {
|
|
test("res.setBody(object)", function() {
|
|
const body = res.getBody();
|
|
expect(body.hello).to.eql("hello from post-res");
|
|
});
|
|
|
|
}
|