Guest User

Untitled

a guest
May 16th, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. it('creates a new video in database', async () => {
  2. const response = await request(app)
  3. .post('/videos')
  4. .type('form')
  5. .send(newVideo);
  6. const createdVideo = await Video.findOne({});
  7. assert.isOk(createdVideo, 'item not found in the database');
  8. assert.include(createdVideo.title, newVideo.title);
  9. assert.include(createdVideo.description, newVideo.description);
  10. assert.include(createdVideo.videoUrl, newVideo.videoUrl);
  11. });
Add Comment
Please, Sign In to add comment