Merge pull request #3707 from lohxt1/fix/multipart-tests

fix: multipart tests
This commit is contained in:
lohit 2024-12-30 10:49:35 +05:30 committed by GitHub
commit 78aa0d07ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 24 deletions

View File

@ -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 {

View File

@ -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
}