mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 08:31:22 +01:00
test: add failing test for #13215
This commit is contained in:
@@ -22,7 +22,7 @@ describe('FEPs', () => {
|
|||||||
await install.giveWorldPrivileges();
|
await install.giveWorldPrivileges();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('1b12', () => {
|
describe.only('1b12', () => {
|
||||||
describe('announceObject()', () => {
|
describe('announceObject()', () => {
|
||||||
let cid;
|
let cid;
|
||||||
let uid;
|
let uid;
|
||||||
@@ -44,6 +44,10 @@ describe('FEPs', () => {
|
|||||||
activitypub._sent.clear();
|
activitypub._sent.clear();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
activitypub._sent.clear();
|
||||||
|
});
|
||||||
|
|
||||||
it('should be called when a topic is moved from uncategorized to another category', async () => {
|
it('should be called when a topic is moved from uncategorized to another category', async () => {
|
||||||
const { topicData } = await topics.post({
|
const { topicData } = await topics.post({
|
||||||
uid,
|
uid,
|
||||||
@@ -61,6 +65,25 @@ describe('FEPs', () => {
|
|||||||
|
|
||||||
assert.strictEqual(activitypub._sent.size, 1);
|
assert.strictEqual(activitypub._sent.size, 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should be called for a newly forked topic', async () => {
|
||||||
|
const { topicData } = await topics.post({
|
||||||
|
uid,
|
||||||
|
cid: -1,
|
||||||
|
title: utils.generateUUID(),
|
||||||
|
content: utils.generateUUID(),
|
||||||
|
});
|
||||||
|
const { tid } = topicData;
|
||||||
|
const [{ pid: reply1Pid }, { pid: reply2Pid }] = await Promise.all([
|
||||||
|
topics.reply({ uid, tid, content: utils.generateUUID() }),
|
||||||
|
topics.reply({ uid, tid, content: utils.generateUUID() }),
|
||||||
|
]);
|
||||||
|
const forked = await topics.createTopicFromPosts(
|
||||||
|
adminUid, utils.generateUUID(), [reply1Pid, reply2Pid], tid, cid
|
||||||
|
);
|
||||||
|
|
||||||
|
assert.strictEqual(activitypub._sent.size, 1);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user