balderdashy / waterline-adapter-tests

API integration tests for Waterline adapters
MIT License
16 stars 41 forks source link

tests semantic types doesn't test stored value #65

Closed atiertant closed 9 years ago

atiertant commented 9 years ago

as you can see in waterline-adapter-tests/interfaces/semantic/types/binary.type.js and others value is checked with the result of create. this shoud work in a perfect world but not in some adapters: to optimize create function,the result of create is the input object with addtion of the database returned id. (no need to make a find that would take more time in the adapter). in this case the test will ever pass without testing data stored in database. a better solution would be to add a find in test to unsure value has been stored and could be read correctly.

dmarcelino commented 9 years ago

Hi @atiertant, that sounds reasonable. Can you submit a pull request? Thanks

atiertant commented 9 years ago

@dmarcelino done https://github.com/balderdashy/waterline-adapter-tests/pull/66

dmarcelino commented 9 years ago

Fixed via #66. Thanks @atiertant.