Skip to content

Instantly share code, notes, and snippets.

@ldco2016
Created June 18, 2018 23:46
Show Gist options
  • Select an option

  • Save ldco2016/b3ed6d1f7f0f710eb10371039c89ad8d to your computer and use it in GitHub Desktop.

Select an option

Save ldco2016/b3ed6d1f7f0f710eb10371039c89ad8d to your computer and use it in GitHub Desktop.
a couple of options
it('A model class can update one record', (done) => {
assertName(User.findOneAndUpdate(joe._id, { name: 'Bill' }), done);
});
it('A model class can find a record with an Id and update', (done) => {
assertName(User.findByIdAndUpdate(joe._id, { name: 'Bill' }), done);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment