File tree Expand file tree Collapse file tree
packages/apps/job-launcher/server/src/modules/whitelist Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,16 +37,16 @@ describe('WhitelistService', () => {
3737 expect ( result ) . toBe ( true ) ;
3838 } ) ;
3939
40- // it('should return false if user is not whitelisted', async () => {
41- // const userId = 2;
42- // jest
43- // .spyOn(whitelistRepository, 'findOneByUserId')
44- // .mockResolvedValue(null);
40+ it ( 'should return false if user is not whitelisted' , async ( ) => {
41+ const userId = 2 ;
42+ jest
43+ . spyOn ( whitelistRepository , 'findOneByUserId' )
44+ . mockResolvedValue ( null ) ;
4545
46- // const result = await whitelistService.isUserWhitelisted(userId);
46+ const result = await whitelistService . isUserWhitelisted ( userId ) ;
4747
48- // expect(whitelistRepository.findOneByUserId).toHaveBeenCalledWith(userId);
49- // expect(result).toBe(false);
50- // });
48+ expect ( whitelistRepository . findOneByUserId ) . toHaveBeenCalledWith ( userId ) ;
49+ expect ( result ) . toBe ( false ) ;
50+ } ) ;
5151 } ) ;
5252} ) ;
You can’t perform that action at this time.
0 commit comments