a guest May 16th, 2018 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.     });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand