mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-12 16:14:25 +03:00
c301510cd1
no issue - request is quite a heavy dependency - we were only using request in 3 places: a test, storing contrib images in the gruntfile & the gravatar lookup - all 3 are relatively simple to do with the http/https module - refactored all 3, removed request
23 lines
700 B
JavaScript
23 lines
700 B
JavaScript
/*globals describe, it*/
|
|
/*jshint expr:true*/
|
|
var should = require('should'),
|
|
http = require('http'),
|
|
config = require('../../../config');
|
|
|
|
describe('Server', function () {
|
|
var port = config.testing.server.port,
|
|
host = config.testing.server.host,
|
|
url = 'http://' + host + ':' + port;
|
|
|
|
it('should not start a connect server when required', function (done) {
|
|
http.get(url, function () {
|
|
done('This request should not have worked');
|
|
}).on('error', function (error) {
|
|
should(error).not.equal(undefined);
|
|
should(error.code).equal('ECONNREFUSED');
|
|
|
|
done();
|
|
});
|
|
});
|
|
});
|