Skip to content

Commit

Permalink
add basic tests for startup... delay. :(
Browse files Browse the repository at this point in the history
  • Loading branch information
martindale committed Mar 23, 2015
1 parent 7c133e5 commit c61945c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/Soundtrack.integration.js
@@ -1,4 +1,7 @@
var assert = require('assert');
var rest = require('restler');

var config = require('../config');

before(function() {
var app = require('../soundtrack');
Expand All @@ -9,5 +12,14 @@ describe('Soundtrack', function() {
it('should run', function() {
assert('ok');
});

it('should accept connections', function( done ) {
setTimeout(function() {
rest.get('http://localhost:'+ config.app.port ).on('complete', function(data, response) {
assert( response.statusCode , 200 );
done();
});
}, 1000);
});
});
});

0 comments on commit c61945c

Please sign in to comment.