Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it('creates a new video in database', async () => {
- const response = await request(app)
- .post('/videos')
- .type('form')
- .send(newVideo);
- const createdVideo = await Video.findOne({});
- assert.isOk(createdVideo, 'item not found in the database');
- assert.include(createdVideo.title, newVideo.title);
- assert.include(createdVideo.description, newVideo.description);
- assert.include(createdVideo.videoUrl, newVideo.videoUrl);
- });
Add Comment
Please, Sign In to add comment