Skip to content

Commit ec204df

Browse files
authored
Merge pull request #1125 from strongloop/Add_test_for_geo_query_oh
Add test for operation hooks
2 parents 1ee0442 + f5e9b53 commit ec204df

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/persistence-hooks.suite.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,18 @@ module.exports = function(dataSource, should, connectorCapabilities) {
9999
});
100100
});
101101

102+
it('triggers correct hooks when near filter is used', function(done) {
103+
monitorHookExecution();
104+
var query = {
105+
where: {location: {near: '10,20', maxDistance: '10', unit: 'meters'}},
106+
};
107+
TestModel.find(query, function(err, list) {
108+
if (err) return done(err);
109+
hookMonitor.names.should.eql(['access']);
110+
done();
111+
});
112+
});
113+
102114
it('should not trigger hooks for geo queries, if notify is false',
103115
function(done) {
104116
monitorHookExecution();

0 commit comments

Comments
 (0)