mirror of
https://github.com/usebruno/bruno.git
synced 2025-02-04 20:09:15 +01:00
28 lines
402 B
Plaintext
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");
|
||
|
});
|
||
|
}
|