Skip to content

Instantly share code, notes, and snippets.

@paulfryzel
Created September 17, 2013 23:17
Show Gist options
  • Save paulfryzel/6602029 to your computer and use it in GitHub Desktop.
Save paulfryzel/6602029 to your computer and use it in GitHub Desktop.
test('POST /photos', function (t) {
var payload = JSON.stringify(sample);
var route = { method: 'POST', url: '/photos', payload: payload};
server.inject(route, function (res) {
t.equal(200, res.statusCode, 'Should respond with 200');
t.ok(res.result, 'Should return a result');
sample._id = res.result.fields._id;
t.end();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment