Merge branch 'fixTests' into 'main'
Fix tests See merge request v3/service/user!47
This commit is contained in:
commit
4a8460318e
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@mobicoop/user",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@mobicoop/user",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"license": "AGPL",
|
||||
"dependencies": {
|
||||
"@grpc/grpc-js": "^1.9.6",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@mobicoop/user",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"description": "Mobicoop V3 User Service",
|
||||
"author": "sbriat",
|
||||
"private": true,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { USER_MESSAGE_PUBLISHER } from '@modules/user/user.di-tokens';
|
||||
import { UserCreatedDomainEvent } from '@modules/user/core/domain/events/user-created.domain-event';
|
||||
import { PublishMessageWhenUserIsDeletedDomainEventHandler } from '@modules/user/core/application/event-handlers/publish-message-when-user-is-deleted.domain-event-handler';
|
||||
import { UserDeletedDomainEvent } from '@modules/user/core/domain/events/user-deleted.domain-event';
|
||||
|
||||
const mockMessagePublisher = {
|
||||
publish: jest.fn().mockImplementation(),
|
||||
|
@ -29,13 +29,9 @@ describe('Publish message when user is deleted domain event handler', () => {
|
|||
|
||||
it('should publish a message', () => {
|
||||
jest.spyOn(mockMessagePublisher, 'publish');
|
||||
const userDeletedDomainEvent: UserCreatedDomainEvent = {
|
||||
const userDeletedDomainEvent: UserDeletedDomainEvent = {
|
||||
id: 'some-domain-event-id',
|
||||
aggregateId: 'some-aggregate-id',
|
||||
firstName: 'John',
|
||||
lastName: 'Doe',
|
||||
email: 'john.doe@email.com',
|
||||
phone: '+33611223344',
|
||||
metadata: {
|
||||
timestamp: new Date('2023-06-28T05:00:00Z').getTime(),
|
||||
correlationId: 'some-correlation-id',
|
||||
|
|
Loading…
Reference in New Issue