mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 04:06:17 +02:00
test: set minimumtitlelength for test
This commit is contained in:
@@ -384,7 +384,10 @@ describe('Post\'s', () => {
|
||||
let pid;
|
||||
let replyPid;
|
||||
let tid;
|
||||
before((done) => {
|
||||
before(function () {
|
||||
this.minimumTitleLength = meta.config.minimumTitleLength;
|
||||
meta.config.minimumTitleLength = 3;
|
||||
|
||||
topics.post({
|
||||
uid: voterUid,
|
||||
cid: cid,
|
||||
@@ -408,6 +411,10 @@ describe('Post\'s', () => {
|
||||
});
|
||||
});
|
||||
|
||||
after(function () {
|
||||
meta.config.minimumTitleLength = this.minimumTitleLength;
|
||||
});
|
||||
|
||||
it('should error if user is not logged in', async () => {
|
||||
try {
|
||||
await apiPosts.edit({ uid: 0 }, { pid: pid, content: 'gg' });
|
||||
|
||||
Reference in New Issue
Block a user