 
 
     it "should return null if app is not authenticated", ( done ) ->
-      vk.request = ( method, url, params, callback ) ->
+      vk.request = ({ method, url, params, callback }) ->
         callback auth: false
 
       vk.getAccessToken "12345", ->



    it "should support promises", ( done ) ->
      vk.request = ( method, url, params, callback ) ->
        callback fakeData

      vk.getAccessToken "12345"


      ERROR_TOO_MANY_REQUESTS = 6
      calls = 0
      vk.request = ({ method, url, params, callback }) ->
        calls += 1
        if calls < 3
          callback error: error_code: ERROR_TOO_MANY_REQUESTS
