2014-06-04 22:26:03 +01:00
|
|
|
/*globals describe, it*/
|
|
|
|
var should = require('should'),
|
2016-02-12 20:04:26 +00:00
|
|
|
http = require('http'),
|
2013-12-06 09:13:15 -05:00
|
|
|
config = require('../../../config');
|
2013-11-19 21:43:55 -05:00
|
|
|
|
|
|
|
describe('Server', function () {
|
2013-11-28 12:33:02 +00:00
|
|
|
var port = config.testing.server.port,
|
|
|
|
host = config.testing.server.host,
|
2013-11-19 21:43:55 -05:00
|
|
|
url = 'http://' + host + ':' + port;
|
|
|
|
|
|
|
|
it('should not start a connect server when required', function (done) {
|
2016-02-12 20:04:26 +00:00
|
|
|
http.get(url, function () {
|
|
|
|
done('This request should not have worked');
|
|
|
|
}).on('error', function (error) {
|
2014-06-04 22:26:03 +01:00
|
|
|
should(error).not.equal(undefined);
|
|
|
|
should(error.code).equal('ECONNREFUSED');
|
2016-02-12 20:04:26 +00:00
|
|
|
|
2013-11-19 21:43:55 -05:00
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|