mirror of
https://github.com/foss42/apidash.git
synced 2025-05-23 17:26:45 +08:00
fix test case
This commit is contained in:
@ -479,7 +479,7 @@ fun main() {
|
|||||||
expectedCode);
|
expectedCode);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('POST 4', () {
|
test('POST 5', () {
|
||||||
const expectedCode = r'''import okhttp3.OkHttpClient
|
const expectedCode = r'''import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.MultipartBody
|
import okhttp3.MultipartBody
|
||||||
@ -487,8 +487,10 @@ import okhttp3.MultipartBody
|
|||||||
fun main() {
|
fun main() {
|
||||||
val client = OkHttpClient()
|
val client = OkHttpClient()
|
||||||
|
|
||||||
val url = "https://api.foss42.com/case/lower"
|
val url = "https://api.apidash.dev/io/form"
|
||||||
val body = MultipartBody.Builder().setType(MultipartBody.FORM).addFormDataPart("text","I LOVE Flutter")
|
val body = MultipartBody.Builder().setType(MultipartBody.FORM).addFormDataPart("text","API")
|
||||||
|
.addFormDataPart("sep","|")
|
||||||
|
.addFormDataPart("times","3")
|
||||||
.build()
|
.build()
|
||||||
val request = Request.Builder()
|
val request = Request.Builder()
|
||||||
.url(url)
|
.url(url)
|
||||||
@ -502,7 +504,7 @@ fun main() {
|
|||||||
println(response.body?.string())
|
println(response.body?.string())
|
||||||
}
|
}
|
||||||
''';
|
''';
|
||||||
expect(kotlinOkHttpCodeGen.getCode(requestModelPost4, "https"),
|
expect(kotlinOkHttpCodeGen.getCode(requestModelPost5, "https"),
|
||||||
expectedCode);
|
expectedCode);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user