@@ -116,7 +116,7 @@ describe('ServiceObject', function() {
116116 var apiResponse = { } ;
117117
118118 function createMethod ( id , options_ , callback ) {
119- callback ( error , { } , apiResponse ) ;
119+ callback ( error , null , apiResponse ) ;
120120 }
121121
122122 var serviceObject = new ServiceObject ( config ) ;
@@ -170,6 +170,25 @@ describe('ServiceObject', function() {
170170 done ( ) ;
171171 } ) ;
172172 } ) ;
173+
174+ it ( 'should execute callback with any amount of arguments' , function ( done ) {
175+ var config = extend ( { } , CONFIG , {
176+ createMethod : createMethod
177+ } ) ;
178+ var options = { } ;
179+
180+ var args = [ 'a' , 'b' , 'c' , 'd' , 'e' , 'f' ] ;
181+
182+ function createMethod ( id , options_ , callback ) {
183+ callback . apply ( null , args ) ;
184+ }
185+
186+ var serviceObject = new ServiceObject ( config ) ;
187+ serviceObject . create ( options , function ( ) {
188+ assert . deepEqual ( [ ] . slice . call ( arguments ) , args ) ;
189+ done ( ) ;
190+ } ) ;
191+ } ) ;
173192 } ) ;
174193
175194 describe ( 'delete' , function ( ) {
0 commit comments