Last active
November 22, 2018 12:23
-
-
Save frostyblok/0e764ef07adc29101e91c5b8d5cffb5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import chai from 'chai'; | |
import chaiHttp from 'chai-http'; | |
import app from '../../../server'; | |
import data from '../model/ariticles'; | |
describe('Get no article', () => { | |
it('should not get an article that does not exit', async () => { | |
const res = await chai.request(app) | |
.get('/api/v1/articles/234'); | |
expect(res.body.status).to.be.equal(404); | |
expect(res.body.message).to.be.deep.equals('Article not found'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This test is for a GET request. It tests for an article with unknown Id and ensures the appropriate status code is displayed.