2023-12-13 03:41:06 -08:00
|
|
|
import { User } from '@db/entities/User';
|
|
|
|
import { CredentialsEntity } from '@db/entities/CredentialsEntity';
|
|
|
|
|
|
|
|
import {
|
|
|
|
randomCredentialPayload,
|
|
|
|
randomEmail,
|
|
|
|
randomInteger,
|
|
|
|
randomName,
|
2024-05-17 01:53:15 -07:00
|
|
|
uniqueId,
|
2023-12-13 03:41:06 -08:00
|
|
|
} from '../../integration/shared/random';
|
2024-05-17 01:53:15 -07:00
|
|
|
import { Project } from '@/databases/entities/Project';
|
2023-12-13 03:41:06 -08:00
|
|
|
|
|
|
|
export const mockCredential = (): CredentialsEntity =>
|
|
|
|
Object.assign(new CredentialsEntity(), randomCredentialPayload());
|
|
|
|
|
|
|
|
export const mockUser = (): User =>
|
|
|
|
Object.assign(new User(), {
|
|
|
|
id: randomInteger(),
|
|
|
|
email: randomEmail(),
|
|
|
|
firstName: randomName(),
|
|
|
|
lastName: randomName(),
|
|
|
|
});
|
2024-05-17 01:53:15 -07:00
|
|
|
|
|
|
|
export const mockProject = (): Project =>
|
|
|
|
Object.assign(new Project(), {
|
|
|
|
id: uniqueId(),
|
|
|
|
type: 'personal',
|
|
|
|
name: 'Nathan Fillion <nathan.fillion@n8n.io>',
|
|
|
|
});
|