 
   it 'should send HTTP 404 if method is not allowed', (done) ->
 
-    queue       = []
-    methods     = ['put', 'patch', 'del']
-    postParams  = generateRegisterRequestParams()
-
-    addRequestToQueue = (queue, method) -> queue.push ->
+    queue      = []
+    methods    = ['put', 'patch', 'del']
+    postParams = generateRegisterRequestParams()
+
+    addRequestToQueue = (queue, method) -> queue.push (next) ->
       postParams.method = method
       request.del postParams, (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 200 if GET request sent to Register hadler url', (done) ->
 
     requestParams = generateRegisterRequestParams()
     request.get requestParams, (err, res, body) ->
-      expect(err)             .to.not.exist
-      expect(res.statusCode)  .to.be.equal 200
+      expect(err).to.not.exist
+      expect(res.statusCode).to.be.equal 200
       done()
 
 
   it 'should send HTTP 400 if username is not specified', (done) ->
 
     postParams = generateRegisterRequestParams
-      body        :
-        username  : ''
+      body       :
+        username : ''
 
     request.post postParams, (err, res, body) ->
       expect(err)             .to.not.exist

    registerParams = generateRegisterRequestParams { body: { email } }

    request.post registerParams, (err, res, body) ->
      expect(err)             .to.not.exist
      expect(res.statusCode)  .to.be.equal 400
      done()


  it 'should send HTTP 400 if agree is set as off', (done) ->

    postParams = generateRegisterRequestParams
      body        :
        agree     : 'off'

    request.post postParams, (err, res, body) ->
      expect(err)             .to.not.exist
      expect(res.statusCode)  .to.be.equal 400
      done()



        'x-requested-with' : 'this is not an XHR'

    request.post postParams, (err, res, body) ->
      expect(err).to.not.exist
      expect(res.statusCode).to.be.equal 301
      done()


