+http = require('http')
 should = require('chai').Should()
 client = require('../common/test/client')
 server = require('../server')

        it "Then I got expected application in a list", ->
            @body.rows.length.should.equal 2
            @body.rows[1].name.should.equal "My App"


describe "Users", ->

    createApp()


fakeServer = (json, code=200, callback=null) ->
    http.createServer (req, res) ->
        body = ""
        req.on 'data', (chunk) ->
            body += chunk
        req.on 'end', ->
            routeInfos = JSON.parse body
            res.writeHead code, 'Content-Type': 'application/json'
            if callback?
                callback(JSON.parse body)
            res.end(JSON.stringify json)


describe "Application installation", ->

    before (done) ->
        server.listen(8888)
