     registerParams = generateRegisterRequestParams { body: { email } }
 
     request.post registerParams, (err, res, body) ->
-      expect(err)             .to.not.exist
-      expect(res.statusCode)  .to.be.equal 400
+      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
+      body    :
+        agree : 'off'
+
+    request.post postParams, (err, res, body) ->
+      expect(err).to.not.exist
+      expect(res.statusCode).to.be.equal 400
       done()
 
 


  it 'should send HTTP 404 if method is not allowed', (done) ->

    queue       = []
    methods     = ['put', 'patch', 'del']
    postParams  = generateRegisterRequestParams()

    addRequestToQueue = (queue, method) -> queue.push ->
      postParams.method = method
      request.del postParams, (err, res, body) ->
        expect(err)             .to.not.exist
        expect(res.statusCode)  .to.be.equal 404
        queue.next()

    for method in methods
      addRequestToQueue queue, method

    queue.push -> done()

    daisy queue


  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
      done()


  it 'should send HTTP 400 if username is not specified', (done) ->

    postParams = generateRegisterRequestParams
      body        :
        username  : ''

    request.post postParams, (err, res, body) ->
      expect(err)             .to.not.exist

        '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()


