   return requestParams
 
 
+withRegisteredUser = (opts, callback) ->
+
+  [opts, callback]      = [callback, opts]  unless callback
+  opts                 ?= {}
+  opts.body             = generateRegisterRequestBody opts.body
+  opts.csrfCookie       = opts.body?._csrf
+  registerRequestParams = generateRegisterRequestParams opts
+
+  request.post registerRequestParams, (err, res, body) ->
+    expect(err).to.not.exist
+    expect(res.statusCode).to.be.equal 200
+    expect(body).to.be.empty
+    callback opts.body
+
+
 module.exports = {
+  withRegisteredUser
   generateRegisterRequestBody
   generateRegisterRequestParams
 }

    inviteCode        : ''
    passwordConfirm   : 'testpass'

  deepObjectExtend defaultBodyObject, opts

  return defaultBodyObject


{ expect
  request
  querystring
  generateUrl
  deepObjectExtend
  generateRandomEmail
