@@ -784,8 +784,12 @@ describe('/account/device/commands', () => {
784784 last : true ,
785785 index : 4 ,
786786 messages : [
787- { index : 3 , data : { command : 'three' , payload : { } } } ,
788- { index : 4 , data : { command : 'four' , payload : { } } } ,
787+ {
788+ index : 2 ,
789+ data : { command : 'two' , payload : { } , sender : '1' . repeat ( 32 ) } ,
790+ } ,
791+ { index : 3 , data : { command : 'three' , payload : { } , sender : '' } } ,
792+ { index : 4 , data : { command : 'four' , payload : { } , sender : null } } ,
789793 ] ,
790794 } ;
791795 const mockPushbox = mocks . mockPushbox ( ) ;
@@ -809,7 +813,18 @@ describe('/account/device/commands', () => {
809813 return runTest ( route , mockRequest ) . then ( ( response ) => {
810814 assert . equal ( mockPushbox . retrieve . callCount , 1 , 'pushbox was called' ) ;
811815 assert . calledWithExactly ( mockPushbox . retrieve , uid , deviceId , 100 , 2 ) ;
812- assert . deepEqual ( response , mockResponse ) ;
816+ assert . deepEqual ( response , {
817+ last : true ,
818+ index : 4 ,
819+ messages : [
820+ {
821+ index : 2 ,
822+ data : { command : 'two' , payload : { } , sender : '1' . repeat ( 32 ) } ,
823+ } ,
824+ { index : 3 , data : { command : 'three' , payload : { } } } ,
825+ { index : 4 , data : { command : 'four' , payload : { } } } ,
826+ ] ,
827+ } ) ;
813828 } ) ;
814829 } ) ;
815830
0 commit comments