25 lines
578 B
CoffeeScript
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()
|
|
)
|
|
)
|
|
)
|
|
)
|