From 1b08f37612666c240b4b77eb299b910279fb95cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 20 Jan 2020 11:15:26 -0500 Subject: [PATCH] fix: tests, was using hardcoded message id --- test/messaging.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/messaging.js b/test/messaging.js index 9f9a3b3341..51104385b0 100644 --- a/test/messaging.js +++ b/test/messaging.js @@ -597,14 +597,14 @@ describe('Messaging Library', function () { }); it('should fail to edit message if new content is empty string', function (done) { - socketModules.chats.edit({ uid: fooUid }, { mid: 5, roomId: roomId, message: ' ' }, function (err) { + socketModules.chats.edit({ uid: fooUid }, { mid: mid, roomId: roomId, message: ' ' }, function (err) { assert.equal(err.message, '[[error:invalid-chat-message]]'); done(); }); }); it('should fail to edit message if not own message', function (done) { - socketModules.chats.edit({ uid: herpUid }, { mid: 5, roomId: roomId, message: 'message edited' }, function (err) { + socketModules.chats.edit({ uid: herpUid }, { mid: mid, roomId: roomId, message: 'message edited' }, function (err) { assert.equal(err.message, '[[error:cant-edit-chat-message]]'); done(); });