Skip to content

Commit

Permalink
feat: adding expressjs route for testing multipart content types (use…
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas PUZIN committed Apr 17, 2024
1 parent 7eab1b6 commit 4179d4d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/bruno-tests/collection/multipart/mixed-content-types.bru
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,24 @@ body:multipart-form {
param2: @file(multipart/small.png)
param3: {"test":"i am json"}
}

tests {
test("Status code is 200", function () {
expect(res.getStatus()).to.equal(200);
});
test("param1 has no content-type", function () {
var param1 = res.body[0];
expect(param1.name).to.equals('param1');
expect(param1.contentType).to.be.undefined;
});
test("param2 has content-type image/png", function () {
var param2 = res.body[1];
expect(param2.name).to.equals('param2');
expect(param2.contentType).to.equals('image/png');
});
test("param3 has content-type application/json", function () {
var param3 = res.body[2];
expect(param3.name).to.equals('param3');
expect(param3.contentType).to.equals('application/json');
});
}

0 comments on commit 4179d4d

Please sign in to comment.