       done()
 
 
-  it 'should send HTTP 400 when username is in use', (done) ->
-
+  it 'should send HTTP 400 when email is in use and username is not in use', (done) ->
+
+    email                   = generateRandomEmail()
     username                = generateRandomString()
+    anotherUsername         = generateRandomString()
+
     registerRequestParams   = RegisterHandlerHelper.generateRequestParams
       body        :
+        email     : email
         username  : username
 
     createTeamRequestParams = generateCreateTeamRequestParams
       body        :
-        username  : username
+        email     : email
+        username  : anotherUsername
 
     queue = [
 

Bongo                               = require "bongo"
koding                              = require './../bongo'

{ daisy }                           = Bongo
{ expect }                          = require "chai"
{ Relationship }                    = require 'jraphical'
{ TeamHandlerHelper
  generateRandomEmail

      body   :
        slug : 'koding'

    expectedBody = "Sorry, Team URL 'koding.#{hostname}' is already in use"
    request.post createTeamRequestParams, (err, res, body) ->
      expect(err)             .to.not.exist
      expect(res.statusCode)  .to.be.equal 403
