diff --git a/src/domain/family_member/family-member.service.ts b/src/domain/family_member/family-member.service.ts index 50e46dd..f1a4cd7 100644 --- a/src/domain/family_member/family-member.service.ts +++ b/src/domain/family_member/family-member.service.ts @@ -35,6 +35,7 @@ export class FamilyMemberService { createFamilyMemberDto.role, family, user, + createFamilyMemberDto.fcmToken, ); const savedMember = await this.familyMemberRepository.save(familyMember); family.memberNumber += 1; diff --git a/src/test/e2e/family-member.e2e.spec.ts b/src/test/e2e/family-member.e2e.spec.ts index 47b27ab..9490475 100644 --- a/src/test/e2e/family-member.e2e.spec.ts +++ b/src/test/e2e/family-member.e2e.spec.ts @@ -28,6 +28,7 @@ describe('FamilyMemberController (e2e)', () => { 1, mockFamily, mockUser, + 'test', ); mockFamilyMember.setId(1); diff --git a/src/test/e2e/family.e2e.spec.ts b/src/test/e2e/family.e2e.spec.ts index 26d0f3d..a5eada8 100644 --- a/src/test/e2e/family.e2e.spec.ts +++ b/src/test/e2e/family.e2e.spec.ts @@ -25,6 +25,7 @@ describe('FamilyController (e2e)', () => { 1, mockFamily, mockUser, + 'test', ); beforeEach(async () => { mockFamilyService = { diff --git a/src/test/e2e/post.e2e.spec.ts b/src/test/e2e/post.e2e.spec.ts index 1190685..4ccc42a 100644 --- a/src/test/e2e/post.e2e.spec.ts +++ b/src/test/e2e/post.e2e.spec.ts @@ -19,7 +19,7 @@ describe('PostController (e2e)', () => { 'testTitle', 'testContext', new Date(), - FamilyMember.createFamilyMember(1, null, null), + FamilyMember.createFamilyMember(1, null, null, ''), ); beforeEach(async () => { diff --git a/src/test/service/family-member.service.spec.ts b/src/test/service/family-member.service.spec.ts index d0a2caa..790be68 100644 --- a/src/test/service/family-member.service.spec.ts +++ b/src/test/service/family-member.service.spec.ts @@ -62,6 +62,7 @@ describe('FamilyMemberService', () => { createFamilyMemberDto.role, family, user, + createFamilyMemberDto.fcmToken, ); user.id = 1; familyMember.setId(1); @@ -84,7 +85,7 @@ describe('FamilyMemberService', () => { }; const family: Family = Family.createFamily('test', 'testKeyCode'); const user: User = User.createUser('test', 'test', 'test', 'test', 1, 1); - const familyMember = FamilyMember.createFamilyMember(1, family, user); + const familyMember = FamilyMember.createFamilyMember(1, family, user, ''); user.id = 1; familyMember.setId(1); @@ -100,7 +101,7 @@ describe('FamilyMemberService', () => { it('should delete family-member', async () => { const family: Family = Family.createFamily('test', 'testKeyCode'); const user = User.createUser('test', 'test', 'test', 'test', 1, 1); - const familyMember = FamilyMember.createFamilyMember(1, family, user); + const familyMember = FamilyMember.createFamilyMember(1, family, user, ''); familyMember.setId(1); jest @@ -117,7 +118,7 @@ describe('FamilyMemberService', () => { it('should find family-member by user id', async () => { const family: Family = Family.createFamily('test', 'testKeyCode'); const user = User.createUser('test', 'test', 'test', 'test', 1, 1); - const familyMember = FamilyMember.createFamilyMember(1, family, user); + const familyMember = FamilyMember.createFamilyMember(1, family, user, ''); familyMember.setId(1); jest.spyOn(userRepository, 'findOne').mockResolvedValue(user); @@ -132,7 +133,7 @@ describe('FamilyMemberService', () => { it('should find family by family-member id', async () => { const family: Family = Family.createFamily('test', 'testKeyCode'); const user = User.createUser('test', 'test', 'test', 'test', 1, 1); - const familyMember = FamilyMember.createFamilyMember(1, family, user); + const familyMember = FamilyMember.createFamilyMember(1, family, user, ''); familyMember.setId(1); family.setId(1); @@ -149,7 +150,7 @@ describe('FamilyMemberService', () => { it('should find all family-member by family id', async () => { const family: Family = Family.createFamily('test', 'testKeyCode'); const user = User.createUser('test', 'test', 'test', 'test', 1, 1); - const familyMember = FamilyMember.createFamilyMember(1, family, user); + const familyMember = FamilyMember.createFamilyMember(1, family, user, ''); familyMember.setId(10); family.setId(1); @@ -165,7 +166,7 @@ describe('FamilyMemberService', () => { it('should find family-member by family-member id', async () => { const family: Family = Family.createFamily('test', 'testKeyCode'); const user = User.createUser('test', 'test', 'test', 'test', 1, 1); - const familyMember = FamilyMember.createFamilyMember(1, family, user); + const familyMember = FamilyMember.createFamilyMember(1, family, user, ''); familyMember.setId(1); jest diff --git a/src/test/service/family.service.spec.ts b/src/test/service/family.service.spec.ts index 94ca3f3..14823fd 100644 --- a/src/test/service/family.service.spec.ts +++ b/src/test/service/family.service.spec.ts @@ -102,7 +102,7 @@ describe('FamilyService', () => { familyKeyCode, ); const user = User.createUser('test', 'test', 'test', 'test', 1, 1); - const familyMember = FamilyMember.createFamilyMember(1, family, user); + const familyMember = FamilyMember.createFamilyMember(1, family, user, ''); familyMember.setId(1); family.setId(1); user.setId(1); diff --git a/src/test/service/interaction.service.spec.ts b/src/test/service/interaction.service.spec.ts index c61affb..631f2e1 100644 --- a/src/test/service/interaction.service.spec.ts +++ b/src/test/service/interaction.service.spec.ts @@ -46,7 +46,7 @@ describe('InteractionService', () => { const user = User.createUser('test', 'test', 'test', 'test', 10, 1); user.setId(1); family.setId(2); - const dstFamilyMember = FamilyMember.createFamilyMember(1, family, user); + const dstFamilyMember = FamilyMember.createFamilyMember(1, family, user, ''); dstFamilyMember.fcmToken = 'test'; dstFamilyMember.setId(3); const createInteractionDto: CreateInteractionDto = { @@ -80,7 +80,7 @@ describe('InteractionService', () => { it('should find all interactions', async () => { //given const familyMemberId = 1; - const dstFamilyMember = FamilyMember.createFamilyMember(1, null, null); + const dstFamilyMember = FamilyMember.createFamilyMember(1, null, null, ''); dstFamilyMember.setId(2); const interaction = Interaction.createInteraction(1, dstFamilyMember, 2); interaction.id = 3; @@ -102,7 +102,7 @@ describe('InteractionService', () => { it('should check all interactions', async () => { //given const familyMemberId = 1; - const dstFamilyMember = FamilyMember.createFamilyMember(1, null, null); + const dstFamilyMember = FamilyMember.createFamilyMember(1, null, null, ''); const interaction = Interaction.createInteraction(1, dstFamilyMember, 2); const interactions = [interaction]; @@ -121,7 +121,7 @@ describe('InteractionService', () => { //given const interactionId = 1; const interaction = Interaction.createInteraction(1, null, 2); - const familyMember = FamilyMember.createFamilyMember(1, null, null); + const familyMember = FamilyMember.createFamilyMember(1, null, null, ''); jest.spyOn(interactionRepository, 'findOne').mockResolvedValue(interaction); jest.spyOn(interactionRepository, 'delete').mockResolvedValue(null); diff --git a/src/test/service/post.service.spec.ts b/src/test/service/post.service.spec.ts index 71fba01..6e920fc 100644 --- a/src/test/service/post.service.spec.ts +++ b/src/test/service/post.service.spec.ts @@ -40,7 +40,7 @@ describe('PostService', () => { }); it('should create post', async () => { - const familyMember = FamilyMember.createFamilyMember(1, null, null); + const familyMember = FamilyMember.createFamilyMember(1, null, null, ''); const post = Post.createPost('test', 'test', new Date(), familyMember); post.id = 1; @@ -62,7 +62,7 @@ describe('PostService', () => { }); it('should update post', async () => { - const familyMember = FamilyMember.createFamilyMember(1, null, null); + const familyMember = FamilyMember.createFamilyMember(1, null, null, ''); const post = Post.createPost('test', 'test', new Date(), familyMember); post.id = 1; @@ -85,7 +85,7 @@ describe('PostService', () => { }); it('should delete post', async () => { - const familyMember = FamilyMember.createFamilyMember(1, null, null); + const familyMember = FamilyMember.createFamilyMember(1, null, null, ''); const post = Post.createPost('test', 'test', new Date(), familyMember); post.id = 1; @@ -98,7 +98,7 @@ describe('PostService', () => { }); it('should get post list', async () => { - const familyMember = FamilyMember.createFamilyMember(1, null, null); + const familyMember = FamilyMember.createFamilyMember(1, null, null, ''); familyMember.id = 1; const post = Post.createPost('test', 'test', new Date(), familyMember); post.id = 1;