 should = require('chai').Should()
 async = require('async')
-Client = require('../common/test/client').Client
+Client = require('request-json').JsonClient
 app = require('../server')
 
 client = new Client("http://localhost:8888/")

    delete @body
    delete @response

parseBody = (response, body) ->
    if typeof body is "object" then body else JSON.parse body

randomString = (length=32) ->
    string = ""

            it "And I should retrieve the good values", (done) ->
                client.get "request/even_num/", (error, response, body) =>
                    response.statusCode.should.equal 200
                    @body = body
                    @body.should.have.length 50
                    done()
                    
    describe "Deletion of an existing view", ->
        before cleanRequest

        it "When I send a request to delete view even_num", (done) ->
            client.del "request/even_num/", (error, response, body) =>
                    response.statusCode.should.equal 204

        it "And I send a request to access view even_num", (done) ->
            client.get "request/even_num", (error, response, body) =>
                @response = response
                done()

        it "Then error 404 should be returned", ->
            @response.statusCode.should.equal 404


