save
This commit is contained in:
@@ -17,12 +17,12 @@ export const createMockUser = (overrides: Partial<UserAggregate> = {}): UserAggr
|
||||
orgid: null,
|
||||
token: null,
|
||||
TokenExpires: null,
|
||||
type: 'regular',
|
||||
phone: null,
|
||||
state: UserState.REGISTERED_NOT_VERIFIED,
|
||||
regdate: new Date('2025-01-01'),
|
||||
updatedate: new Date('2025-01-01'),
|
||||
updateDate: new Date('2025-01-01'),
|
||||
Orglogindate: null,
|
||||
get isAdmin() { return this.state === UserState.ADMIN; },
|
||||
...overrides
|
||||
});
|
||||
|
||||
@@ -35,7 +35,7 @@ export const createMockOrganization = (overrides: Partial<OrganizationAggregate>
|
||||
contactemail: 'contact@testorg.com',
|
||||
state: OrganizationState.ACTIVE,
|
||||
regdate: new Date('2025-01-01'),
|
||||
updatedate: new Date('2025-01-01'),
|
||||
updateDate: new Date('2025-01-01'),
|
||||
url: null,
|
||||
userinorg: 0,
|
||||
maxOrganizationalDecks: 10,
|
||||
@@ -52,9 +52,11 @@ export const createMockDeck = (overrides: Partial<DeckAggregate> = {}): DeckAggr
|
||||
cards: [],
|
||||
playedNumber: 0,
|
||||
ctype: CType.PUBLIC,
|
||||
updatedate: new Date('2025-01-01'),
|
||||
updateDate: new Date('2025-01-01'),
|
||||
state: DeckState.ACTIVE,
|
||||
organization: null,
|
||||
user: null,
|
||||
isEditable: jest.fn().mockReturnValue(true),
|
||||
...overrides
|
||||
});
|
||||
|
||||
@@ -92,6 +94,7 @@ export const createMockUserRepository = (): jest.Mocked<IUserRepository> => ({
|
||||
delete: jest.fn(),
|
||||
softDelete: jest.fn(),
|
||||
deactivate: jest.fn(),
|
||||
activate: jest.fn(),
|
||||
} as jest.Mocked<IUserRepository>);
|
||||
|
||||
export const createMockOrganizationRepository = (): jest.Mocked<IOrganizationRepository> => ({
|
||||
|
||||
Reference in New Issue
Block a user