bruno/packages/bruno-tests/collection/scripting/api/req/setUrl.bru
Anoop M D 753a576c3c
Feat/safe mode quickjs (#2848)
Safe Mode Sandbox using QuickJS
Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
Co-authored-by: lohit <lohit.jiddimani@gmail.com>
2024-08-21 12:52:49 +05:30

28 lines
402 B
Plaintext

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