mirror of
https://github.com/usebruno/bruno.git
synced 2024-12-01 04:13:41 +01:00
49 lines
632 B
Plaintext
49 lines
632 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();
|
|
const query = url.split("?")[1];
|
|
expect(query).to.equal("foo={{undefinedVar}}");
|
|
|
|
const data = res.getBody();
|
|
expect(res.getBody()).to.eql({
|
|
"hello": "{{undefinedVar2}}"
|
|
});
|
|
});
|
|
|
|
}
|