Skip to content

Commit

Permalink
Fix 'Get An Object' Bruno API test
Browse files Browse the repository at this point in the history
  • Loading branch information
seansica committed Apr 23, 2024
1 parent bc4914e commit d5334fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bruno/Get An Object.bru
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ tests {
});

test("Verify returned object ID matches requested object ID", function() {
const requestedObjectId = 'intrusion-set--bef4c620-0787-42a8-a96d-b7eb6e85917c';
const url = req.getUrl(); // Get the URL from the request
// Regular expression to match the objectId in the URL format
const objectIdRegex = /objects\/([^\/]+)/;
// Use the regex to find the objectId
let requestedObjectId = url.match(objectIdRegex)[1];
const data = res.getBody();
expect(data.objects).to.be.an('array');
if (data.objects.length > 0) {
Expand Down

0 comments on commit d5334fa

Please sign in to comment.