   it 'should send HTTP 404 if request method is not POST', (done) ->
 
     recoverRequestParams = generateRecoverRequestParams
-      body       :
-        email    : generateRandomEmail()
+      body    :
+        email : generateRandomEmail()
 
-    queue       = []
-    methods     = ['put', 'patch', 'delete']
+    queue   = []
+    methods = ['put', 'patch', 'delete']
 
-    addRequestToQueue = (queue, method) -> queue.push ->
+    addRequestToQueue = (queue, method) -> queue.push (next) ->
       recoverRequestParams.method = method
       request recoverRequestParams, (err, res, body) ->
-        expect(err)             .to.not.exist
-        expect(res.statusCode)  .to.be.equal 404
-        queue.next()
+        expect(err).to.not.exist
+        expect(res.statusCode).to.be.equal 404
+        next()
 
     for method in methods
       addRequestToQueue queue, method
 
-    queue.push -> done()
-
-    daisy queue
+    async.series queue, done
 
 
   it 'should send HTTP 400 if email params is not set', (done) ->

        email : generateRandomEmail()

    request.post recoverRequestParams, (err, res, body) ->
      expect(err)             .to.not.exist
      expect(res.statusCode)  .to.be.equal 200
      expect(body)            .to.be.equal ''
      done()



{ async
  expect
  request
  generateRandomEmail
  generateRandomString
  generateRandomUsername }        = require '../../../testhelper'
{ testCsrfToken }                 = require '../../../testhelper/handler'
{ generateRecoverRequestParams }  = require '../../../testhelper/handler/recoverhelper'
{ generateRegisterRequestParams } = require '../../../testhelper/handler/registerhelper'


# here we have actual tests
