arvid-e 1 неделя назад
Родитель
Сommit
451aba9150
1 измененных файлов с 0 добавлено и 58 удалено
  1. 0 58
      apps/app/src/server/service/activity/update-activity.spec.ts

+ 0 - 58
apps/app/src/server/service/activity/update-activity.spec.ts

@@ -203,64 +203,6 @@ describe('shouldGenerateUpdate()', () => {
     expect(result).toBe(false);
   });
 
-  it('should generate update activity if: update is by the same user, outside the suppression window, not first update', async () => {
-    await Activity.insertMany([
-      {
-        user: currentUserId,
-        action: SupportedAction.ACTION_PAGE_CREATE,
-        createdAt: new Date(date.getTime() - TWO_HOURS),
-        target: targetPageId,
-        _id: createActivityId,
-      },
-      {
-        user: currentUserId,
-        action: SupportedAction.ACTION_PAGE_UPDATE,
-        createdAt: new Date(date.getTime() - ONE_HOUR),
-        target: targetPageId,
-        _id: olderActivityId,
-      },
-      {
-        user: currentUserId,
-        action: SupportedAction.ACTION_PAGE_UPDATE,
-        createdAt: new Date(),
-        target: targetPageId,
-        _id: currentActivityId,
-      },
-    ]);
-
-    await Revision.insertMany([
-      {
-        _id: new mongoose.Types.ObjectId(),
-        pageId: targetPageId,
-        body: 'Old content',
-        format: 'markdown',
-        author: currentUserId,
-      },
-      {
-        _id: new mongoose.Types.ObjectId(),
-        pageId: targetPageId,
-        body: 'Old content',
-        format: 'markdown',
-        author: currentUserId,
-      },
-      {
-        _id: new mongoose.Types.ObjectId(),
-        pageId: targetPageId,
-        body: 'Newer content',
-        format: 'markdown',
-        author: currentUserId,
-      },
-    ]);
-
-    const result = await shouldGenerateUpdate({
-      targetPageId: targetPageIdStr,
-      currentUserId: currentUserIdStr,
-      currentActivityId: currentActivityIdStr,
-    });
-
-    expect(result).toBe(true);
-  });
-
   it('should not generate update activity if: update is made by the same user, within suppression window, not first update', async () => {
     await Activity.insertMany([
       {