Просмотр исходного кода

Make amount of activities and revisions be consistent

arvid-e 2 недель назад
Родитель
Сommit
4ecec98413
1 измененных файлов с 24 добавлено и 3 удалено
  1. 24 3
      apps/app/src/server/service/activity/update-activity.spec.ts

+ 24 - 3
apps/app/src/server/service/activity/update-activity.spec.ts

@@ -208,10 +208,17 @@ describe('shouldGenerateUpdate()', () => {
       {
       {
         user: currentUserId,
         user: currentUserId,
         action: SupportedAction.ACTION_PAGE_CREATE,
         action: SupportedAction.ACTION_PAGE_CREATE,
-        createdAt: new Date(date.getTime() - ONE_HOUR),
+        createdAt: new Date(date.getTime() - TWO_HOURS),
         target: targetPageId,
         target: targetPageId,
         _id: createActivityId,
         _id: createActivityId,
       },
       },
+      {
+        user: currentUserId,
+        action: SupportedAction.ACTION_PAGE_UPDATE,
+        createdAt: new Date(date.getTime() - ONE_HOUR),
+        target: targetPageId,
+        _id: olderActivityId,
+      },
       {
       {
         user: currentUserId,
         user: currentUserId,
         action: SupportedAction.ACTION_PAGE_UPDATE,
         action: SupportedAction.ACTION_PAGE_UPDATE,
@@ -259,10 +266,17 @@ describe('shouldGenerateUpdate()', () => {
       {
       {
         user: currentUserId,
         user: currentUserId,
         action: SupportedAction.ACTION_PAGE_CREATE,
         action: SupportedAction.ACTION_PAGE_CREATE,
-        createdAt: new Date(date.getTime() - ONE_MINUTE),
+        createdAt: new Date(date.getTime() - TWO_HOURS),
         target: targetPageId,
         target: targetPageId,
         _id: createActivityId,
         _id: createActivityId,
       },
       },
+      {
+        user: currentUserId,
+        action: SupportedAction.ACTION_PAGE_UPDATE,
+        createdAt: new Date(date.getTime() - ONE_MINUTE),
+        target: targetPageId,
+        _id: olderActivityId,
+      },
       {
       {
         user: currentUserId,
         user: currentUserId,
         action: SupportedAction.ACTION_PAGE_UPDATE,
         action: SupportedAction.ACTION_PAGE_UPDATE,
@@ -310,10 +324,17 @@ describe('shouldGenerateUpdate()', () => {
       {
       {
         user: currentUserId,
         user: currentUserId,
         action: SupportedAction.ACTION_PAGE_CREATE,
         action: SupportedAction.ACTION_PAGE_CREATE,
-        createdAt: new Date(date.getTime() - ONE_HOUR),
+        createdAt: new Date(date.getTime() - TWO_HOURS),
         target: targetPageId,
         target: targetPageId,
         _id: createActivityId,
         _id: createActivityId,
       },
       },
+      {
+        user: currentUserId,
+        action: SupportedAction.ACTION_PAGE_UPDATE,
+        createdAt: new Date(date.getTime() - ONE_HOUR),
+        target: targetPageId,
+        _id: olderActivityId,
+      },
       {
       {
         user: currentUserId,
         user: currentUserId,
         action: SupportedAction.ACTION_PAGE_UPDATE,
         action: SupportedAction.ACTION_PAGE_UPDATE,