         done()
 
 
-
-    describe "Initialize database with the object User : ", ->
-        it "When I send the request", (done) -> 
-            client.post 'data/102/', {email: "user@CozyCloud.CC", \
-                    timezone: "Europe/Paris", password: "pwd_user", \
-                    docType: "User"}, (error, response, body) =>
-                done()
-
     describe "Master key handling tests : ", ->
         describe "Initialization of the master key", ->
             before cleanRequest
 
             it "When I send a request to initialize the master key", (done) ->
                 @randomValue = randomString 8
-                client.post 'accounts/password/', {pwd: @randomValue}, \
-                            (error, response, body) =>
-                    @response = response
-                    done()
-
-            it "When I send a request to check the salt", (done)->
+                data = pwd: @randomValue
+                client.post 'accounts/password/', data, (err, res, body) =>
+                    @response = res
+                    done()
+
+            it "And I send a request to check the salt", (done)->
                 client.get 'data/102/', (error, response, body) =>
                     @body = body
                     done()


            it "Then slave key should be encrypted", ->
                @slaveKey.should.not.be.equal app.crypto.slaveKey



    describe "Create", ->

should = require('chai').Should()
async = require('async')
crypto = require('../lib/crypto.coffee')
Client = require('request-json').JsonClient

app = require('../server')
user = require('../lib/user.coffee')


client = new Client("http://localhost:8888/")
db = require('../helpers/db_connect_helper').db_connect()


# helpers

