Skip to content

Instantly share code, notes, and snippets.

@toamitkumar
Created November 21, 2015 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toamitkumar/d48f6526a5ce16f2b0c0 to your computer and use it in GitHub Desktop.
Save toamitkumar/d48f6526a5ce16f2b0c0 to your computer and use it in GitHub Desktop.
// TEST
lab.test('it returns 500 error on failure', function (done) {
scope = nock(nockUrl)
.get('/some/endpoint')
.reply(500);
request = {
method: 'GET',
url: '/some/endpoint
};
server.inject(request, function (response) {
Code.expect(response.statusCode).to.equal(500);
done();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment