Ghost/core/test/unit/server_spec.js
Harry Wolff c8c02a65fa Remove ghost.js
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.
2013-12-07 10:10:02 -05:00

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();
});
});
});