Files
bruno/packages/bruno-tests/collection/scripting/api/req/setUrl.bru
2024-08-12 12:27:32 +05:30

36 lines
515 B
Plaintext

meta {
name: setUrl
type: http
seq: 2
}
get {
url: {{host}}/ping/invalid
body: none
auth: none
}
auth:awsv4 {
accessKeyId: a
secretAccessKey: b
sessionToken: c
service: d
region: e
profileName: f
}
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");
});
}