|
|
@@ -113,23 +113,23 @@ describe('File API Integration Tests', () => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- // it('should return 400 for invalid request data', async () => {
|
|
|
- // const invalidData = {
|
|
|
- // name: '', // Empty name
|
|
|
- // type: 'text/plain'
|
|
|
- // };
|
|
|
+ it('should return 400 for invalid request data', async () => {
|
|
|
+ const invalidData = {
|
|
|
+ name: '', // Empty name
|
|
|
+ type: 'text/plain'
|
|
|
+ };
|
|
|
|
|
|
- // const response = await client.files['upload-policy'].$post({
|
|
|
- // json: invalidData
|
|
|
- // },
|
|
|
- // {
|
|
|
- // headers: {
|
|
|
- // 'Authorization': 'Bearer test-token'
|
|
|
- // }
|
|
|
- // });
|
|
|
+ const response = await client.files['upload-policy'].$post({
|
|
|
+ json: invalidData
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Bearer test-token'
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- // expect(response.status).toBe(400);
|
|
|
- // });
|
|
|
+ expect(response.status).toBe(400);
|
|
|
+ });
|
|
|
|
|
|
// it('should handle service errors gracefully', async () => {
|
|
|
// const mockFileData = {
|