Closed khalilTN closed 9 years ago
Looks good– thanks! :+1:
You are welcome ! ;)
@khalilTN, @atiertant, this does look good indeed! This has exposed an apparent bug in sails-mongo since it is breaking the test:
build log line 536: https://travis-ci.org/balderdashy/waterline-adapter-tests/jobs/61589255#L536
We'll need to fix that before we can merge this to avoid breaking the build. I've raised balderdashy/sails-mongo#272 to address the sails-mongo issue.
@dmarcelino there is no better demonstation about this tests are useful...
Indeed! :smiley:
@khalilTN, @atiertant, it just occurred to me that this change make us lose the verification of the values returned by .create()
. Can we also add checks to those, like:
assert.equal(createdRecord.list.length, 4);
I've submitted PR balderdashy/sails-mongo#274 which fixes balderdashy/sails-mongo#272, feel free to review it! :wink:
I have commited the tests for the record returned by .create().
Perfect @khalilTN! Thank you.
The tests of data types (semantic/types) use the values returned from a .create() call, .create() retrieved only auto incremented ids from the table so the values returned in callback will be the same values passed as parameters, that's why the test should insert, and then query the table to retrieve the persistent value.