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

28 lines
426 B
Plaintext

meta {
name: getUrl
type: http
seq: 1
}
get {
url: {{host}}/ping
body: none
auth: none
}
assert {
res.status: eq 200
res.body: eq pong
}
tests {
test("res.url", function() {
expect(res.url).to.equal("https://testbench-sanity.usebruno.com/ping");
});
test("res.getUrl()", function() {
const url = res.getUrl();
expect(url).to.equal("https://testbench-sanity.usebruno.com/ping");
});
}