mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Standardize filename casing for services and Public API (no-changelog) (#10579)
This commit is contained in:
29
packages/cli/test/shared/mock-objects.ts
Normal file
29
packages/cli/test/shared/mock-objects.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { randomInt } from 'n8n-workflow';
|
||||
import { User } from '@/databases/entities/User';
|
||||
import { CredentialsEntity } from '@/databases/entities/credentials-entity';
|
||||
import { Project } from '@/databases/entities/project';
|
||||
|
||||
import {
|
||||
randomCredentialPayload,
|
||||
randomEmail,
|
||||
randomName,
|
||||
uniqueId,
|
||||
} from '../integration/shared/random';
|
||||
|
||||
export const mockCredential = (): CredentialsEntity =>
|
||||
Object.assign(new CredentialsEntity(), randomCredentialPayload());
|
||||
|
||||
export const mockUser = (): User =>
|
||||
Object.assign(new User(), {
|
||||
id: randomInt(1000),
|
||||
email: randomEmail(),
|
||||
firstName: randomName(),
|
||||
lastName: randomName(),
|
||||
});
|
||||
|
||||
export const mockProject = (): Project =>
|
||||
Object.assign(new Project(), {
|
||||
id: uniqueId(),
|
||||
type: 'personal',
|
||||
name: 'Nathan Fillion <nathan.fillion@n8n.io>',
|
||||
});
|
||||
Reference in New Issue
Block a user