mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-08 04:03:12 +03:00
2dd1f4a635
- test should use testing config, not development config. If you run the tests whilst also running the dev server, the tests fail.
30 lines
914 B
JavaScript
30 lines
914 B
JavaScript
/*globals describe, beforeEach, it*/
|
|
var net = require('net'),
|
|
assert = require('assert'),
|
|
should = require('should'),
|
|
request = require('request'),
|
|
server = require('../../server'),
|
|
Ghost = require('../../ghost'),
|
|
config = require('../../../config'),
|
|
|
|
ghost = new Ghost();
|
|
|
|
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();
|
|
});
|
|
});
|
|
|
|
});
|
|
|