feat: wire up direct uploads with local file provider (#12643)
This commit is contained in:
@@ -605,6 +605,22 @@ medusaIntegrationTestRunner({
|
||||
'Invalid column name(s) "Product field"'
|
||||
)
|
||||
})
|
||||
|
||||
it("should handle error when the source file does not exists", async () => {
|
||||
const { body, meta } = getUploadReq({
|
||||
name: "test.csv",
|
||||
key: "test.csv",
|
||||
size: 0,
|
||||
})
|
||||
|
||||
const batchJobRes = await api
|
||||
.post("/admin/products/imports", body, meta)
|
||||
.catch((e) => e)
|
||||
|
||||
expect(batchJobRes.response.data.message).toEqual(
|
||||
"An unknown error occurred."
|
||||
)
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
@@ -55,7 +55,7 @@ medusaIntegrationTestRunner({
|
||||
extension: "csv",
|
||||
mime_type: "text/csv",
|
||||
size: file.size,
|
||||
url: expect.stringContaining(response.data.filename),
|
||||
url: "/admin/uploads",
|
||||
})
|
||||
)
|
||||
expect(response.status).toEqual(200)
|
||||
|
||||
Reference in New Issue
Block a user