test: add failing test for #13215

This commit is contained in:
Julian Lam
2025-03-03 11:20:41 -05:00
parent 324d232faa
commit feb9421507

View File

@@ -22,7 +22,7 @@ describe('FEPs', () => {
await install.giveWorldPrivileges();
});
describe('1b12', () => {
describe.only('1b12', () => {
describe('announceObject()', () => {
let cid;
let uid;
@@ -44,6 +44,10 @@ describe('FEPs', () => {
activitypub._sent.clear();
});
afterEach(() => {
activitypub._sent.clear();
});
it('should be called when a topic is moved from uncategorized to another category', async () => {
const { topicData } = await topics.post({
uid,
@@ -61,6 +65,25 @@ describe('FEPs', () => {
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);
});
});
});
});