-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(image-upload): implement image upload functionality (#129)
- implement image upload functionality using cloudinary [Delivers #128]
- Loading branch information
Showing
11 changed files
with
361 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import request from 'supertest'; | ||
import app from '../app'; | ||
import { getBuyerToken, afterAllHook, beforeAllHook } from './testSetup'; | ||
|
||
|
||
beforeAll(beforeAllHook); | ||
afterAll(afterAllHook); | ||
|
||
|
||
describe('Image upload Tests', () => { | ||
let token: string; | ||
|
||
beforeAll(async () => { | ||
token = await getBuyerToken() | ||
}); | ||
|
||
it('should delete profile image successfully', async() => { | ||
const response = await request(app).delete('/api/v1/user/profileImg').set('Authorization',`Bearer ${token}`) | ||
expect(response.status).toBe(200) | ||
expect(response.body.message).toBe('Profile image successfully deleted') | ||
expect(response.body.data).toBeDefined() | ||
}) | ||
}) |
Oops, something went wrong.