it('returns 0 when nothing has changed', () => { req.session.userId = fixtures.u1.id req.params = { userId: fixtures.u3.id, query: '', posts: [{id: p2.id, updated_at: null}, {id: p3.id, updated_at: null}] } return PostController.checkFreshnessForUser(req, res) .then(() => { expect(res.body.count).to.equal(0) }) })
.then(() => PostController.checkFreshnessForUser(req, res))