 
   it 'should send HTTP 403 when slug is set as koding', (done) ->
 
-    createTeamRequestParams = generateCreateTeamRequestParams
-      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
-      expect(body)            .to.be.equal expectedBody
-      done()
+    generateCreateTeamRequestParams {
+      body : { slug : 'koding' }
+    }, (createTeamRequestParams) ->
+
+      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
+        expect(body)            .to.be.equal expectedBody
+        done()
 
 
   it 'should send HTTP 403 when slug is set as an already used one', (done) ->
 
     slug                    = generateRandomString()
-    createTeamRequestParams = generateCreateTeamRequestParams
-      body   :
-        slug : slug
 
     queue = [
 
       ->
-        # expecting first team create request to be successful
-        request.post createTeamRequestParams, (err, res, body) ->
-          expect(err)             .to.not.exist
-          expect(res.statusCode)  .to.be.equal 200
-          queue.next()
-
-      ->
-        # expecting second team crete request with the same slug to fail
-        expectedBody = "Sorry, Team URL '#{slug}.#{hostname}' is already in use"
-        request.post createTeamRequestParams, (err, res, body) ->
-          expect(err)             .to.not.exist
-          expect(res.statusCode)  .to.be.equal 403
-          expect(body)            .to.be.equal expectedBody
-          queue.next()
+        generateCreateTeamRequestParams {
+          body : { slug }
+        }, (createTeamRequestParams) ->
+
+          # expecting first team create request to be successful
+          request.post createTeamRequestParams, (err, res, body) ->
+            expect(err)             .to.not.exist
+            expect(res.statusCode)  .to.be.equal 200
+            queue.next()
+
+      ->
+        generateCreateTeamRequestParams {
+          body : { slug }
+        }, (createTeamRequestParams) ->
+
+          # expecting second team crete request with the same slug to fail
+          expectedBody = "Sorry, Team URL '#{slug}.#{hostname}' is already in use"
+          request.post createTeamRequestParams, (err, res, body) ->
+            expect(err)             .to.not.exist
+            expect(body)            .to.be.equal expectedBody
+            expect(res.statusCode)  .to.be.equal 403
+            expect(body)            .to.be.equal expectedBody
+            queue.next()
 
       -> done()
 

      '-'
      '-domain'
      'domain-'
      '(domain'
      '!domain'
      '#domain'
      'domain@'
      'domain%'
      'domain?'
      'domain☺'
      'domainCamelCase'
      'domain.with.dots'
      'domain with whitespaces'


    username                = generateRandomString()
    password                = 'testpass'
    createTeamRequestParams = null

    registerRequestParams   = generateRegisterRequestParams
      body       :
