mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
c8c02a65fa
fixes #1575 - Moves most code that was in ghost.js into ./core/server/index.js - Creates ./core/server/config/theme.js to hold all theme configurations (which previously lived on ghost.blogGlobals()) - Removed ghost.server, passing it in as an argument where needed and allowing middleware to hold onto a reference for lazy use.
27 lines
832 B
JavaScript
27 lines
832 B
JavaScript
/*globals describe, beforeEach, it*/
|
|
var net = require('net'),
|
|
assert = require('assert'),
|
|
should = require('should'),
|
|
request = require('request'),
|
|
server = require('../../server'),
|
|
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) {
|
|
request(url, function (error, response, body) {
|
|
assert.equal(response, undefined);
|
|
assert.equal(body, undefined);
|
|
assert.notEqual(error, undefined);
|
|
assert.equal(error.code, 'ECONNREFUSED');
|
|
done();
|
|
});
|
|
});
|
|
|
|
});
|
|
|