2014-06-05 01:26:03 +04:00
|
|
|
/*globals describe, it*/
|
|
|
|
/*jshint expr:true*/
|
|
|
|
var should = require('should'),
|
2013-11-20 06:43:55 +04:00
|
|
|
request = require('request'),
|
2013-12-06 18:13:15 +04:00
|
|
|
config = require('../../../config');
|
2013-11-20 06:43:55 +04:00
|
|
|
|
|
|
|
describe('Server', function () {
|
2013-11-28 16:33:02 +04:00
|
|
|
var port = config.testing.server.port,
|
|
|
|
host = config.testing.server.host,
|
2013-11-20 06:43:55 +04:00
|
|
|
url = 'http://' + host + ':' + port;
|
|
|
|
|
|
|
|
|
|
|
|
it('should not start a connect server when required', function (done) {
|
|
|
|
request(url, function (error, response, body) {
|
2014-06-05 01:26:03 +04:00
|
|
|
should(response).equal(undefined);
|
|
|
|
should(body).equal(undefined);
|
|
|
|
should(error).not.equal(undefined);
|
|
|
|
should(error.code).equal('ECONNREFUSED');
|
2013-11-20 06:43:55 +04:00
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|