mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-30 16:14:06 +00:00
39 lines
708 B
Plaintext
39 lines
708 B
Plaintext
meta {
|
|
name: Get UUID
|
|
type: http
|
|
seq: 2
|
|
}
|
|
|
|
get {
|
|
url: https://httpbin.org/uuid
|
|
body: none
|
|
auth: none
|
|
}
|
|
|
|
headers {
|
|
Accept: application/json
|
|
}
|
|
|
|
tests {
|
|
test("This test will fail", function() {
|
|
expect(res.getStatus()).to.equal(404); // Intentional failure
|
|
});
|
|
|
|
test("Status code is 200", function() {
|
|
expect(res.getStatus()).to.equal(200);
|
|
});
|
|
|
|
test("Response is an object", function() {
|
|
expect(res.getBody()).to.be.an('object');
|
|
});
|
|
|
|
test("Response has uuid property", function() {
|
|
expect(res.getBody()).to.have.property('uuid');
|
|
});
|
|
|
|
test("UUID is a string", function() {
|
|
const body = res.getBody();
|
|
expect(body.uuid).to.be.a('string');
|
|
});
|
|
}
|