Skip to content

Commit

Permalink
edit the route test
Browse files Browse the repository at this point in the history
relates #14
  • Loading branch information
AlaaSaadeddin committed Mar 31, 2020
1 parent a546d2c commit 9fcda4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions server/controllers/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Router = require('express').Router();
const router = require('express').Router();
const userRouter = require('./routes/user');

Router.use(userRouter);
router.use(userRouter);

module.exports = Router;
module.exports = router;
4 changes: 2 additions & 2 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ afterAll(() => {
});

describe('Cohort', () => {
test('Route /cohorts status 200, json header, data.id = data.id', (done) => {
test('Route /cohorts status 200, json header, data', (done) => {
return request(app)
.get('/api/v1/cohorts')
.expect(200)
.expect('Content-Type', /json/)
.end((err, res) => {
if (err) return done(err);
const { data } = res.body;
expect(data.id).toBe(data.id);
expect(data).toHaveLength(2);
done();
});
});
Expand Down

0 comments on commit 9fcda4f

Please sign in to comment.