Jelajahi Sumber

wip: writing tests for permission sorting

Patrick O'Carroll 7 tahun lalu
induk
melakukan
6b4ef7f598
1 mengubah file dengan 19 tambahan dan 0 penghapusan
  1. 19 0
      public/app/stores/PermissionsStore/PermissionsStore.jest.ts

+ 19 - 0
public/app/stores/PermissionsStore/PermissionsStore.jest.ts

@@ -17,6 +17,22 @@ describe('PermissionsStore', () => {
           teamId: 1,
           teamName: 'MyTestTeam',
         },
+        {
+          id: 5,
+          dashboardId: 10,
+          permission: 1,
+          permissionName: 'View',
+          userId: 1,
+          userName: 'MyTestUser',
+        },
+        {
+          id: 6,
+          dashboardId: 10,
+          permission: 1,
+          permissionName: 'Edit',
+          teamId: 2,
+          teamName: 'MyTestTeam2',
+        },
       ])
     );
 
@@ -32,7 +48,10 @@ describe('PermissionsStore', () => {
       }
     );
 
+    console.log(store);
+
     await store.load(1, false, false);
+    console.log(store);
   });
 
   it('should save update on permission change', async () => {