From 795cd196f2d2c6aa4aaf9f2781d09a32202b2c9f Mon Sep 17 00:00:00 2001 From: lohxt1 Date: Mon, 30 Dec 2024 10:46:12 +0530 Subject: [PATCH] fix: multipart tests --- .../collection/echo/echo multipart.bru | 2 ++ .../multipart/mixed-content-types.bru | 24 ------------------- 2 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 packages/bruno-tests/collection/multipart/mixed-content-types.bru diff --git a/packages/bruno-tests/collection/echo/echo multipart.bru b/packages/bruno-tests/collection/echo/echo multipart.bru index 1edb2ca8..09176d74 100644 --- a/packages/bruno-tests/collection/echo/echo multipart.bru +++ b/packages/bruno-tests/collection/echo/echo multipart.bru @@ -11,6 +11,7 @@ post { } body:multipart-form { + foo: {"bar":"baz"} @contentType(application/json--test) form-data-key: {{form-data-key}} form-data-stringified-object: {{form-data-stringified-object}} file: @file(bruno.png) @@ -19,6 +20,7 @@ body:multipart-form { assert { res.body: contains form-data-value res.body: contains {"foo":123} + res.body: contains Content-Type: application/json--test } script:pre-request { diff --git a/packages/bruno-tests/collection/multipart/mixed-content-types.bru b/packages/bruno-tests/collection/multipart/mixed-content-types.bru deleted file mode 100644 index 29ed04ba..00000000 --- a/packages/bruno-tests/collection/multipart/mixed-content-types.bru +++ /dev/null @@ -1,24 +0,0 @@ -meta { - name: mixed-content-types - type: http - seq: 1 -} - -post { - url: {{host}}/api/multipart/mixed-content-types - body: multipartForm - auth: none -} - -body:multipart-form { - param1: test - param2: {"test":"i am json"} @contentType(application/json) - param3: @file(multipart/small.png) -} - -assert { - res.status: eq 200 - res.body.find(p=>p.name === 'param1').contentType: isUndefined - res.body.find(p=>p.name === 'param2').contentType: eq application/json - res.body.find(p=>p.name === 'param3').contentType: eq image/png -}