test: set minimumtitlelength for test

This commit is contained in:
Julian Lam
2026-03-03 12:06:50 -05:00
parent b02cdaa9b4
commit 7429b5d4ed

View File

@@ -384,7 +384,10 @@ describe('Post\'s', () => {
let pid; let pid;
let replyPid; let replyPid;
let tid; let tid;
before((done) => { before(function () {
this.minimumTitleLength = meta.config.minimumTitleLength;
meta.config.minimumTitleLength = 3;
topics.post({ topics.post({
uid: voterUid, uid: voterUid,
cid: cid, 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 () => { it('should error if user is not logged in', async () => {
try { try {
await apiPosts.edit({ uid: 0 }, { pid: pid, content: 'gg' }); await apiPosts.edit({ uid: 0 }, { pid: pid, content: 'gg' });