save
Version:
A simple CRUD based persistence abstraction for storing objects to any backend data store. eg. Memory, MongoDB, Redis, CouchDB, Postgres, Punch Card etc.
18 lines (16 loc) • 509 B
JavaScript
module.exports = function(idProperty, getEngine) {
describe('#idProperty', function() {
it('should return name of the idProperty', function(done) {
getEngine(function(ignoreError, engine) {
engine.idProperty.should.eql('_id')
done()
})
})
it('should should be able to change the idProperty', function(done) {
getEngine({ idProperty: 'hello' }, function(ignoreError, engine) {
engine.idProperty.should.eql('hello')
done()
})
})
})
}