Skip to content

Instantly share code, notes, and snippets.

@frostyblok
Last active November 22, 2018 16:43
Show Gist options
  • Save frostyblok/d834a5baac3bb25dde34d5a3d93c868e to your computer and use it in GitHub Desktop.
Save frostyblok/d834a5baac3bb25dde34d5a3d93c868e to your computer and use it in GitHub Desktop.
import chai from 'chai';
import chaiHttp from 'chai-http';
import app from '../../../server';
describe('Get no article', () => {
it('should not get an article that does not exist', async () => {
const res = await chai.req(app)
.get('/api/v1/articles/234');
expect(res.status).to.be.equal(404);
expect(res.body.message).to.be.deep.equals('Article not found');
});
});
@frostyblok
Copy link
Author

@johnson and @marcdomain thank you for the feedback, I will implement them right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment