Skip to content

Instantly share code, notes, and snippets.

@seriousManual
Created August 26, 2013 13:33
Show Gist options
  • Save seriousManual/6341448 to your computer and use it in GitHub Desktop.
Save seriousManual/6341448 to your computer and use it in GitHub Desktop.
describe('sample test request', function () {
var response, body;
before(function (done) {
var options = {
url: BASE_URL + 'outputDebugInfo',
headers: {
'foo': 'bar'
}
};
request(options, function (err, res, bdy) {
expect(err).to.be.null;
response = res;
body = bdy;
done();
});
});
it('should send status code 200', function () {
expect(response.statusCode).to.equal(200);
});
it('should show default page', function () {
expect(body).to.equal('fooPage');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment