Last active
August 29, 2015 14:11
-
-
Save rtucker88/e4e23e59e0d1539dbaac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lab.experiment("Routes", function () { | |
lab.beforeEach(function (done) { | |
server = new Hapi.Server(); | |
server.pack.register([{ | |
plugin: require('../../server') | |
}, { | |
plugin: require('../index') | |
}], function (err) { | |
if(err) { | |
console.error(err); | |
done(); | |
} | |
console.log('starting server...'); | |
server.start(function() { | |
console.log('Server started at: ' + server.info.uri); | |
done(); | |
}); | |
}); | |
}); | |
lab.test("Gets a mission", function (done) { | |
var payload = {}; | |
var options = { | |
method: 'GET', url: '/servers/1/missions/5' | |
}; | |
server.inject(options, function (res) { | |
console.log(res); | |
done(); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment