 db = connection.database('cozy')
 
 
+# TEST SECTION #################################################################
 
 before (done) ->
     # Prepare database for tests
-    db.save '321', {"value":"val"} # insert id 321 : Existence
+    db.destroy ->
+        console.log 'DB destroyed'
+        db.create ->
+            console.log 'DB recreated'
+            db.save '321', {"value":"val"} # insert id 321 : Existence
 
     # start app
     app.listen(8888)


        it "Then { _id: '321', value: 'val'} should be returned", ->
            @body.should.deep.equal {"_id": '321', "value":"val"}



describe "Find", ->
    describe "Find a Document that does not exist in database", ->
        before ->
            delete @body
            delete @response

        it "When I send a request to get Document with id 123", (done) ->
            client.get "data/123/", (error, response, body) =>
                @response = response
                done()
