Update what is being audit logged (#11833)
No need to audit log workflow runs as it's already a form of audit log. Add more audit log for other objects Rename MessagingTelemetry to MessagingMonitoring Merge Analytics and Audit in one (Audit) --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
19
packages/twenty-server/test/utils/audit-context.mock.ts
Normal file
19
packages/twenty-server/test/utils/audit-context.mock.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { TrackEventName } from 'src/engine/core-modules/audit/types/events.type';
|
||||
|
||||
export const AuditContextMock = (params?: {
|
||||
track?:
|
||||
| ((
|
||||
event: TrackEventName,
|
||||
properties: any,
|
||||
) => Promise<{ success: boolean }>)
|
||||
| jest.Mock<any, any>;
|
||||
pageview?:
|
||||
| ((name: string, properties: any) => Promise<{ success: boolean }>)
|
||||
| jest.Mock<any, any>;
|
||||
}) => {
|
||||
return {
|
||||
track: params?.track ?? jest.fn().mockResolvedValue({ success: true }),
|
||||
pageview:
|
||||
params?.pageview ?? jest.fn().mockResolvedValue({ success: true }),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user