Guest User

Untitled

a guest
Sep 25th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. describe('POST /api/v1/orders', () => {
  2. it('should add new orders', (done) => {
  3. chai.request(server)
  4. .post('/api/v1/orders')
  5. .send({
  6. name: 'Tope',
  7. date: new Date().toJSON().slice(0, 10).replace(/-/g, '-'),
  8. designation: 'Oshodi',
  9. dishType: 'Amala',
  10. drink: 'Goldspot',
  11. qty: 2,
  12. price: 2340,
  13. })
  14. .then((res) => {
  15. res.should.to.have.status(201);
  16. res.body.should.have.property('result');
  17. res.body.should.be.an('object');
  18. })
  19. .catch((err) => {
  20. console.log(err);
  21. });
  22. done();
  23. });
  24. });
Add Comment
Please, Sign In to add comment