describe('authenticate admin', () => {
beforeEach(() => {
app.post(
'/',
authenticateAdmin,
() => {}
);
});
it('success', (done) => {
request(app)
.post('/')
.set('user', {
name: 'Jack',
type: 'admin'
})
.end((err, res) => {
if (err) return done(err);
console.log(res);
done();
});
});
});