File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -535,7 +535,7 @@ API.v1.addRoute(
535535 if ( settings . get ( 'Log_Level' ) === '2' ) {
536536 Meteor . _debug ( `Exception while invoking method ${ method } ` , err ) ;
537537 }
538- return API . v1 . failure ( mountResult ( { id, error : err } ) ) ;
538+ return API . v1 . success ( mountResult ( { id, error : err } ) ) ;
539539 }
540540 } ,
541541 } ,
Original file line number Diff line number Diff line change @@ -3111,10 +3111,9 @@ describe('Meteor.methods', () => {
31113111 room = (
31123112 await createRoom ( {
31133113 type : 'd' ,
3114- name : `direct.test.${ Date . now ( ) } -${ Math . random ( ) } ` ,
31153114 username : guestUser . username ,
31163115 } )
3117- ) . body . channel ;
3116+ ) . body . room ;
31183117 createdRooms . push ( room ) ;
31193118 } ) ;
31203119 after ( ( ) =>
@@ -3141,9 +3140,8 @@ describe('Meteor.methods', () => {
31413140 . expect ( 'Content-Type' , 'application/json' )
31423141 . expect ( 200 )
31433142 . expect ( ( res ) => {
3144- expect ( res . body ) . to . have . property ( 'success' , false ) ;
3145- expect ( res . body ) . to . have . property ( 'error' ) . that . is . a ( 'string' ) ;
3146- expect ( res . body . error ) . to . equal ( 'error-cant-invite-for-direct-room' ) ;
3143+ expect ( res . body ) . to . have . property ( 'message' ) . that . is . an ( 'string' ) ;
3144+ expect ( res . body . message ) . to . include ( 'error-cant-invite-for-direct-room' ) ;
31473145 } )
31483146 . end ( done ) ;
31493147 } ) ;
You can’t perform that action at this time.
0 commit comments