mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 12:55:44 +02:00
test: set minimumtitlelength for test
This commit is contained in:
@@ -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' });
|
||||||
|
|||||||
Reference in New Issue
Block a user