Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe('POST /api/v1/orders', () => {
- it('should add new orders', (done) => {
- chai.request(server)
- .post('/api/v1/orders')
- .send({
- name: 'Tope',
- date: new Date().toJSON().slice(0, 10).replace(/-/g, '-'),
- designation: 'Oshodi',
- dishType: 'Amala',
- drink: 'Goldspot',
- qty: 2,
- price: 2340,
- })
- .then((res) => {
- res.should.to.have.status(201);
- res.body.should.have.property('result');
- res.body.should.be.an('object');
- })
- .catch((err) => {
- console.log(err);
- });
- done();
- });
- });
Add Comment
Please, Sign In to add comment