From a45b42107eba97e4caeedb89d304551b85807fae Mon Sep 17 00:00:00 2001 From: Saad Jutt Date: Thu, 17 Mar 2022 07:22:53 +0500 Subject: [PATCH] chore: fixed specs --- api/src/routes/api/spec/drive.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/src/routes/api/spec/drive.spec.ts b/api/src/routes/api/spec/drive.spec.ts index 7740f92..ef6cdd5 100644 --- a/api/src/routes/api/spec/drive.spec.ts +++ b/api/src/routes/api/spec/drive.spec.ts @@ -260,7 +260,7 @@ describe('files', () => { .attach('file', fileToAttachPath) .expect(400) - expect(res.text).toEqual(`"filePath" is required`) + expect(res.text).toEqual(`"_filePath" is required`) expect(res.body).toEqual({}) }) @@ -269,9 +269,9 @@ describe('files', () => { const pathToUpload = '/my/path/code.oth' const res = await request(app) - .post('/SASjsApi/drive/file') + .post(`/SASjsApi/drive/file?_filePath=${pathToUpload}`) .auth(accessToken, { type: 'bearer' }) - .field('filePath', pathToUpload) + // .field('filePath', pathToUpload) .attach('file', fileToAttachPath) .expect(400) @@ -420,7 +420,7 @@ describe('files', () => { .attach('file', fileToAttachPath) .expect(400) - expect(res.text).toEqual(`"filePath" is required`) + expect(res.text).toEqual(`"_filePath" is required`) expect(res.body).toEqual({}) }) @@ -429,9 +429,9 @@ describe('files', () => { const pathToUpload = '/my/path/code.oth' const res = await request(app) - .patch('/SASjsApi/drive/file') + .patch(`/SASjsApi/drive/file?_filePath=${pathToUpload}`) .auth(accessToken, { type: 'bearer' }) - .field('filePath', pathToUpload) + // .field('filePath', pathToUpload) .attach('file', fileToAttachPath) .expect(400)