@@ -458,15 +458,15 @@ describe('Chat API', function() {
458458 if ( err ) {
459459 done . fail ( "Request unread messages count error: " + JSON . stringify ( err ) ) ;
460460 } else {
461- expect ( res [ " total" ] ) . toEqual ( 0 ) ;
461+ expect ( res . total ) . toEqual ( 0 ) ;
462462 expect ( res [ dialogId ] ) . toEqual ( 0 ) ;
463463
464464 done ( ) ;
465465 }
466466 } ) ;
467467 } , REST_REQUESTS_TIMEOUT ) ;
468468
469- it ( 'can delete a message with id ' , function ( done ) {
469+ it ( 'can delete a message with id' , function ( done ) {
470470 QB . chat . message . delete ( [ messageId , "notExistentId" ] , { force : 1 } , function ( err , res ) {
471471 if ( err ) {
472472 done . fail ( "Delete message " + messageId + " error: " + JSON . stringify ( err ) ) ;
@@ -479,13 +479,13 @@ describe('Chat API', function() {
479479 } , REST_REQUESTS_TIMEOUT ) ;
480480
481481 it ( 'can delete a dialog (group)' , function ( done ) {
482- QB . chat . dialog . delete ( [ dialogId , " notExistentId" ] , { force : 1 } , function ( err , res ) {
482+ QB . chat . dialog . delete ( [ dialogId , ' notExistentId' ] , { force : 1 } , function ( err , res ) {
483483 if ( err ) {
484- done . fail ( " Delete dialog " + dialogId + " error: " + JSON . stringify ( err ) ) ;
484+ done . fail ( ' Delete dialog ' + dialogId + ' error: ' + JSON . stringify ( err ) ) ;
485485 } else {
486- expect ( res [ " SuccessfullyDeleted" ] [ " ids" ] ) . toEqual ( [ dialogId ] ) ;
487- expect ( res [ " NotFound" ] [ " ids" ] ) . toEqual ( [ "notExistentId" ] ) ;
488- expect ( res [ " WrongPermissions" ] [ " ids" ] ) . toEqual ( [ ] ) ;
486+ expect ( res . SuccessfullyDeleted . ids ) . toEqual ( [ dialogId ] ) ;
487+ expect ( res . NotFound . ids ) . toEqual ( [ "notExistentId" ] ) ;
488+ expect ( res . WrongPermissions . ids ) . toEqual ( [ ] ) ;
489489
490490 done ( ) ;
491491 }
0 commit comments