Explorar o código

Make amount of activities and revisions be consistent

arvid-e hai 2 semanas
pai
achega
4ecec98413
Modificáronse 1 ficheiros con 24 adicións e 3 borrados
  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,
         action: SupportedAction.ACTION_PAGE_CREATE,
-        createdAt: new Date(date.getTime() - ONE_HOUR),
+        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,
@@ -259,10 +266,17 @@ describe('shouldGenerateUpdate()', () => {
       {
         user: currentUserId,
         action: SupportedAction.ACTION_PAGE_CREATE,
-        createdAt: new Date(date.getTime() - ONE_MINUTE),
+        createdAt: new Date(date.getTime() - TWO_HOURS),
         target: targetPageId,
         _id: createActivityId,
       },
+      {
+        user: currentUserId,
+        action: SupportedAction.ACTION_PAGE_UPDATE,
+        createdAt: new Date(date.getTime() - ONE_MINUTE),
+        target: targetPageId,
+        _id: olderActivityId,
+      },
       {
         user: currentUserId,
         action: SupportedAction.ACTION_PAGE_UPDATE,
@@ -310,10 +324,17 @@ describe('shouldGenerateUpdate()', () => {
       {
         user: currentUserId,
         action: SupportedAction.ACTION_PAGE_CREATE,
-        createdAt: new Date(date.getTime() - ONE_HOUR),
+        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,