mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 08:31:22 +01:00
more tests
This commit is contained in:
@@ -339,7 +339,7 @@ describe('Messaging Library', function () {
|
||||
});
|
||||
|
||||
it('should not error if user is not in room', function (done) {
|
||||
socketModules.chats.markRead({ uid: herpUid }, roomId, function (err) {
|
||||
socketModules.chats.markRead({ uid: herpUid }, 10, function (err) {
|
||||
assert.ifError(err);
|
||||
done();
|
||||
});
|
||||
@@ -511,6 +511,13 @@ describe('Messaging Library', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('should fail to delete message if not owner', function (done) {
|
||||
socketModules.chats.delete({ uid: herpUid }, { messageId: mid, roomId: roomId }, function (err) {
|
||||
assert.equal(err.message, '[[error:cant-delete-chat-message]]');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
it('should delete message', function (done) {
|
||||
socketModules.chats.delete({ uid: fooUid }, { messageId: mid, roomId: roomId }, function (err) {
|
||||
|
||||
Reference in New Issue
Block a user