 
         request.post requestParams, (err, res, body) ->
           expect(err).to.not.exist
-          expect(res.statusCode).to.be.equal 200
-          expect(body).to.be.equal ''
+          expect(res.statusCode).to.be.equal 403
+          expect(body).to.be.equal 'Empty team list'
           next()
-
     ]
 
     async.series queue, done

      done()


  it 'should send HTTP 200 if email is valid', (done) ->

    email = generateRandomEmail()


      done()


  it 'should send HTTP 200 if user is related to any team', (done) ->

    slug  = generateRandomString()
    email = generateRandomEmail()

    registerRequestParams = generateRegisterRequestParams
      body : { email }

    queue = [

      (next) ->
        request.post registerRequestParams, (err, res, body) ->
          expect(err).to.not.exist
          expect(res.statusCode).to.be.equal 200
          next()

      (next) ->
        options = { body : { slug, invitees : email, companyName : slug } }
        generateCreateTeamRequestParams options, (createTeamRequestParams) ->

          request.post createTeamRequestParams, (err, res, body) ->
            expect(err).to.not.exist
            expect(res.statusCode).to.be.equal 200
            next()

      (next) ->
        requestParams = FindTeamHelper.generateRequestParams
          body    : { email }

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

    async.series queue, done


beforeTests()
runTests()
