Skip to content

Instantly share code, notes, and snippets.

@rubberduck203
Created January 12, 2017 22:48
Show Gist options
  • Save rubberduck203/1ad40d0d64c5181d440d6c3826ea1271 to your computer and use it in GitHub Desktop.
Save rubberduck203/1ad40d0d64c5181d440d6c3826ea1271 to your computer and use it in GitHub Desktop.
describe('when successful', () => {
it('should return all items', () => {
return todo.findAll(request, response)
.then(() => {
var actual = response._getData();
expect(actual).to.deep.equal(testData);
}).catch((err) => {
throw err
});
});
it('should return a 200 ok', () => {
return todo.findAll(request, response)
.then(() => {
expect(response.statusCode).to.equal(200);
}).catch((err) => {
throw err;
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment