Skip to content

Commit

Permalink
Add test for searching for users
Browse files Browse the repository at this point in the history
  • Loading branch information
rotimi committed Jun 13, 2018
1 parent faaa73e commit 759c3c4
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/endpoints/invite.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,24 @@ describe('POST to /invite', () => {
token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjk1Mjg5MzIxMzEsIl9pZCI6IjViMjA1NWEzNDc1NGFhMDVmYjBlZjc5OSIsImVtYWlsIjoiZG91Z2xhc2VnaWVtZWhAZ21haWwuY29tIiwiaWF0IjoxNTI4ODQ1NzMxfQ.gOaq1u2hgcz4Hv_HJ8p0knOPIuXe_9PkoRqW0oJXx8g'
})
.end((err, res) => {
console.log(res);
res.body.message.should.equal('Email sent successfully');
res.status.should.equal(200);
done();
});
});
});

describe('get to /search', () => {
it('Should search users', (done) => {
request
.post('/api/search')
.send({
term: '',
})
.end((err, res) => {
res.body.message.should.equal('Users Found');
res.status.should.equal(200);
done();
});
});
});

0 comments on commit 759c3c4

Please sign in to comment.