mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-14 10:37:45 +01:00
test: add missing awaits, change error message
This commit is contained in:
@@ -87,22 +87,22 @@ describe('Topic tools', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should throw when attempting to move a topic from a remote category', async () => {
|
it('should throw when attempting to move a topic from a remote category', async () => {
|
||||||
assert.rejects(
|
await assert.rejects(
|
||||||
topics.tools.move(tid1, {
|
topics.tools.move(tid1, {
|
||||||
cid: localCid,
|
cid: localCid,
|
||||||
uid: 'system',
|
uid: 'system',
|
||||||
}),
|
}),
|
||||||
'[[error:cant-move-topic-to-from-remote-categories]]'
|
{ message: '[[error:no-topic]]' }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw when attempting to move a topic to a remote category', async () => {
|
it('should throw when attempting to move a topic to a remote category', async () => {
|
||||||
assert.rejects(
|
await assert.rejects(
|
||||||
topics.tools.move(tid2, {
|
topics.tools.move(tid2, {
|
||||||
cid: remoteCid,
|
cid: remoteCid,
|
||||||
uid: 'system',
|
uid: 'system',
|
||||||
}),
|
}),
|
||||||
'[[error:cant-move-topic-to-from-remote-categories]]'
|
{ message: '[[error:cant-move-topic-to-from-remote-categories]]' }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user