File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010} from './helpers' ;
1111import { User } from '../src/entity' ;
1212import { clearFile , UploadPreset } from '../src/common/cloudinary' ;
13+ import { fallbackImages } from '../src/config' ;
1314
1415let con : DataSource ;
1516let state : GraphQLTestingState ;
@@ -254,7 +255,7 @@ describe('mutation updateUserInfo', () => {
254255 expect ( res . errors ) . toBeFalsy ( ) ;
255256
256257 const updatedUser = await repo . findOneBy ( { id : loggedUser } ) ;
257- expect ( updatedUser ?. image ) . toBeNull ( ) ;
258+ expect ( updatedUser ?. image ) . toBe ( fallbackImages . avatar ) ;
258259 expect ( clearFile ) . toHaveBeenCalledWith ( {
259260 referenceId : loggedUser ,
260261 preset : UploadPreset . Avatar ,
@@ -318,7 +319,7 @@ describe('mutation updateUserInfo', () => {
318319 expect ( res . errors ) . toBeFalsy ( ) ;
319320
320321 const updatedUser = await repo . findOneBy ( { id : loggedUser } ) ;
321- expect ( updatedUser ?. image ) . toBeNull ( ) ;
322+ expect ( updatedUser ?. image ) . toBe ( fallbackImages . avatar ) ;
322323 expect ( updatedUser ?. cover ) . toBeNull ( ) ;
323324
324325 expect ( clearFile ) . toHaveBeenCalledTimes ( 2 ) ;
You can’t perform that action at this time.
0 commit comments