@@ -6,7 +6,10 @@ import { LoggerServiceFile } from '../../src/logger/services/logger.service.file
66import { LoggerServiceDb } from '../../src/logger/services/logger.service.db' ;
77import { SendNotificationDto } from '../../src/notification/presentation/dtos/send-notification.dto' ;
88import { Notification } from '../../src/notification/domain/entities/notification.entity' ;
9- import { NotificationChannel , NotificationType } from '../../src/config/notification.config' ;
9+ import {
10+ NotificationChannel ,
11+ NotificationType ,
12+ } from '../../src/config/notification.config' ;
1013
1114describe ( 'NotificationController' , ( ) => {
1215 let controller : NotificationController ;
@@ -18,7 +21,6 @@ describe('NotificationController', () => {
1821 'Test Subject' ,
1922 'Test Body' ,
2023 NotificationChannel . EMAIL ,
21- NotificationType . ADMISSION_ID ,
2224 new Date ( ) ,
2325 ) ;
2426
@@ -83,7 +85,11 @@ describe('NotificationController', () => {
8385 it ( 'should send notification and log successfully' , async ( ) => {
8486 await controller . send ( mockSendDto ) ;
8587
86- expect ( factory . createStrategy ) . toHaveBeenCalledWith ( mockSendDto . mediaType ) ;
88+ // eslint-disable-next-line @typescript-eslint/unbound-method
89+ expect ( factory . createStrategy ) . toHaveBeenCalledWith (
90+ mockSendDto . mediaType ,
91+ ) ;
92+ // eslint-disable-next-line @typescript-eslint/unbound-method
8793 expect ( repository . save ) . toHaveBeenCalledWith ( expect . any ( Notification ) ) ;
8894 expect ( mockStrategy . send ) . toHaveBeenCalledWith ( expect . any ( Notification ) ) ;
8995 } ) ;
@@ -102,6 +108,7 @@ describe('NotificationController', () => {
102108 jest . spyOn ( repository , 'findAll' ) ;
103109 const result = await controller . getNotificationHistory ( 1 , 10 ) ;
104110
111+ // eslint-disable-next-line @typescript-eslint/unbound-method
105112 expect ( repository . findAll ) . toHaveBeenCalledWith ( 0 , 10 ) ;
106113 expect ( result ) . toEqual ( {
107114 data : [ mockNotification ] ,
@@ -112,9 +119,12 @@ describe('NotificationController', () => {
112119 } ) ;
113120
114121 it ( 'should handle custom pagination' , async ( ) => {
115- jest . spyOn ( repository , 'findAll' ) . mockResolvedValue ( [ mockNotification , mockNotification ] ) ;
122+ jest
123+ . spyOn ( repository , 'findAll' )
124+ . mockResolvedValue ( [ mockNotification , mockNotification ] ) ;
116125 const result = await controller . getNotificationHistory ( 2 , 5 ) ;
117126
127+ // eslint-disable-next-line @typescript-eslint/unbound-method
118128 expect ( repository . findAll ) . toHaveBeenCalledWith ( 5 , 5 ) ;
119129 expect ( result ) . toEqual ( {
120130 data : [ mockNotification , mockNotification ] ,
0 commit comments