sum7/warehost-frontend
sum7
/
warehost-frontend
Archived
1
0
Fork 0
This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
warehost-frontend/tests/modul/web.coffee

25 lines
578 B
CoffeeScript

expect = require("chai").expect
request = require('request')
lib = require('../lib')
config = require('../config')
module.exports = ()->
describe('web',->
it('test of test',(done)->
lib.login((j,login)->
request({method: 'GET',uri:config.ADDRESS+"/web/involve",jar:j},(err,res,body)->
expect(err).to.be.null
expect(res.statusCode).to.be.equal(200)
if(typeof body == "string")
body = JSON.parse(body)
expect(body.error).to.be.undefined
expect(body.data).to.be.a("array")
console.log(login,body.data)
done()
)
)
)
)