@@ -19,6 +19,7 @@ import {
19
19
} from './entity/song.entity' ;
20
20
import { SongUploadService } from './song-upload/song-upload.service' ;
21
21
import { SongService } from './song.service' ;
22
+ import { SongWebhookService } from './song-webhook/song-webhook.service' ;
22
23
23
24
const mockFileService = {
24
25
deleteSong : jest . fn ( ) ,
@@ -30,6 +31,14 @@ const mockSongUploadService = {
30
31
processSongPatch : jest . fn ( ) ,
31
32
} ;
32
33
34
+ const mockSongWebhookService = {
35
+ syncAllSongsWebhook : jest . fn ( ) ,
36
+ postSongWebhook : jest . fn ( ) ,
37
+ updateSongWebhook : jest . fn ( ) ,
38
+ deleteSongWebhook : jest . fn ( ) ,
39
+ syncSongWebhook : jest . fn ( ) ,
40
+ } ;
41
+
33
42
describe ( 'SongService' , ( ) => {
34
43
let service : SongService ;
35
44
let fileService : FileService ;
@@ -40,6 +49,10 @@ describe('SongService', () => {
40
49
const module : TestingModule = await Test . createTestingModule ( {
41
50
providers : [
42
51
SongService ,
52
+ {
53
+ provide : SongWebhookService ,
54
+ useValue : mockSongWebhookService ,
55
+ } ,
43
56
{
44
57
provide : getModelToken ( SongEntity . name ) ,
45
58
useValue : mongoose . model ( SongEntity . name , SongSchema ) ,
0 commit comments