Makes the tests more comprehensive by testing find, findById,
findByIdAndUpdate, findOne, findOneAndUpdate independently instead
of only testing findOne almost exclusively.
Also re-organizes the structure of the test to reduce the re-creation
of schemas, models and docs and consolidates some of the code together
to ensure consistent testing behavior is achieved.
NOTE: Had to skip the last test currently as it is broken. This is tracked by #22. Strange bit is that all of the tests fail, not just the find. I'm not sure what I did to break it but tests seem logical.
Makes the tests more comprehensive by testing find, findById, findByIdAndUpdate, findOne, findOneAndUpdate independently instead of only testing findOne almost exclusively.
Also re-organizes the structure of the test to reduce the re-creation of schemas, models and docs and consolidates some of the code together to ensure consistent testing behavior is achieved.
NOTE: Had to skip the last test currently as it is broken. This is tracked by #22. Strange bit is that all of the tests fail, not just the
find
. I'm not sure what I did to break it but tests seem logical.