diff --git a/test/persistence-hooks.suite.js b/test/persistence-hooks.suite.js index ab7158bd..dab7ff57 100644 --- a/test/persistence-hooks.suite.js +++ b/test/persistence-hooks.suite.js @@ -99,6 +99,18 @@ module.exports = function(dataSource, should, connectorCapabilities) { }); }); + it('triggers correct hooks when near filter is used', function(done) { + monitorHookExecution(); + var query = { + where: {location: {near: '10,20', maxDistance: '10', unit: 'meters'}}, + }; + TestModel.find(query, function(err, list) { + if (err) return done(err); + hookMonitor.names.should.eql(['access']); + done(); + }); + }); + it('should not trigger hooks for geo queries, if notify is false', function(done) { monitorHookExecution();