Merge pull request #1125 from strongloop/Add_test_for_geo_query_oh
Add test for operation hooks
This commit is contained in:
commit
ec204dfa14
|
@ -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',
|
it('should not trigger hooks for geo queries, if notify is false',
|
||||||
function(done) {
|
function(done) {
|
||||||
monitorHookExecution();
|
monitorHookExecution();
|
||||||
|
|
Loading…
Reference in New Issue