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/lib.coffee

17 lines
420 B
CoffeeScript
Raw Normal View History

2016-08-14 14:22:11 +02:00
expect = require("chai").expect
request = require('request')
config = require('./config')
module.exports.login = (call)->
j = request.jar()
request({method: 'POST',uri: config.ADDRESS+"/login",json:{
username: config.testdata.username,
password: config.testdata.password
},jar:j},(err,res,body)->
expect(err).to.be.null
expect(res.statusCode).to.be.equal(200)
expect(body.data).to.be.true
call(j)
)