bruno/packages/bruno-tests/collection/string interpolation/missing values.bru

48 lines
627 B
Plaintext

meta {
name: missing values
type: http
seq: 1
}
post {
url: {{host}}/api/echo/json?foo={{undefinedVar}}
body: json
auth: none
}
query {
foo: {{undefinedVar}}
}
auth:basic {
username: asd
password: j
}
auth:bearer {
token:
}
body:json {
{
"hello": "{{undefinedVar2}}"
}
}
assert {
res.status: eq 200
}
tests {
test("should return json", function() {
const url = req.getUrl();
expect(url).to.equal("http://localhost:80/api/echo/json?foo={{undefinedVar}}");
const data = res.getBody();
expect(res.getBody()).to.eql({
"hello": "{{undefinedVar2}}"
});
});
}