From de2ed50259266740a4d6410333c262dff5f84e71 Mon Sep 17 00:00:00 2001 From: Bradley Hilton Date: Wed, 24 May 2017 16:34:31 -0500 Subject: [PATCH] Add a test for the new rest api endpoint --- tests/end-to-end/api/05-chat.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/end-to-end/api/05-chat.js b/tests/end-to-end/api/05-chat.js index d77eaae05d5..f10ff93932e 100644 --- a/tests/end-to-end/api/05-chat.js +++ b/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)