Skip to content

Commit

Permalink
error test
Browse files Browse the repository at this point in the history
  • Loading branch information
Evheniy Bystrov committed Feb 19, 2017
1 parent 545ebff commit 3d97000
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion tests/index.js
Expand Up @@ -122,7 +122,7 @@ describe('YEPS app boilerplate test', () => {
expect(isTestFinished).is.true;
});

it('should test aggregator from redis', async () => {
it('should test aggregator from api', async () => {
let isTestFinished = false;

await redis.del('/?users=users&categories=categories');
Expand Down Expand Up @@ -198,4 +198,22 @@ describe('YEPS app boilerplate test', () => {

await redis.del('/?users=users&categories=categories');
});

it('should test aggregator with error', async () => {
let isTestFinished = false;

await chai.request(server)
.get('/')
.query({
users: 'users',
category: 'category'
})
.send()
.catch(err => {
expect(err).to.have.status(500);
isTestFinished = true;
});

expect(isTestFinished).is.true;
});
});

0 comments on commit 3d97000

Please sign in to comment.