Add a test for the new rest api endpoint

pull/7085/head
Bradley Hilton 9 years ago
parent e76d6e36f4
commit de2ed50259
No known key found for this signature in database
GPG Key ID: 0666B2C24C43C358
  1. 15
      tests/end-to-end/api/05-chat.js

@ -57,6 +57,21 @@ describe('[Chat]', function() {
.end(done);
});
it('/chat.getMessage', (done) => {
request.get(api('chat.getMessage'))
.set(credentials)
.query({
msgId: message._id
})
.expect('Content-Type', 'application/json')
.expect(200)
.expect((res) => {
expect(res.body).to.have.property('success', true);
expect(res.body).to.have.deep.property('message._id', message._id);
})
.end(done);
});
it('/chat.update', (done) => {
request.post(api('chat.update'))
.set(credentials)

Loading…
Cancel
Save