2016-04-11 18:52:20 +00:00
|
|
|
var server = require('../server'),
|
|
|
|
chai = require('chai'),
|
2016-08-01 14:47:07 +00:00
|
|
|
chaiHTTP = require('chai-http'),
|
2016-04-11 18:52:20 +00:00
|
|
|
should = chai.should();
|
|
|
|
|
2016-08-01 14:47:07 +00:00
|
|
|
chai.use(chaiHTTP);
|
|
|
|
|
|
|
|
reqServer = process.env.HTTP_TEST_SERVER || server
|
2016-04-11 18:52:20 +00:00
|
|
|
|
|
|
|
describe('Basic routes tests', function() {
|
|
|
|
|
|
|
|
it('GET to / should return 200', function(done){
|
2016-08-01 14:47:07 +00:00
|
|
|
chai.request(reqServer)
|
2016-04-11 18:52:20 +00:00
|
|
|
.get('/')
|
|
|
|
.end(function(err, res) {
|
|
|
|
res.should.have.status(200);
|
|
|
|
done();
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
it('GET to /pagecount should return 200', function(done){
|
2016-08-01 14:47:07 +00:00
|
|
|
chai.request(reqServer)
|
2016-04-11 18:52:20 +00:00
|
|
|
.get('/pagecount')
|
|
|
|
.end(function(err, res) {
|
|
|
|
res.should.have.status(200);
|
|
|
|
done();
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|