Skip to content

Commit 4f4c846

Browse files
committed
Added geo index with min,max test
1 parent 991a3dc commit 4f4c846

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/index_test.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,25 @@ exports.shouldThrowDuplicateKeyErrorWhenDriverInStrictMode = function(test) {
749749
});
750750
}
751751

752+
/**
753+
* @ignore
754+
*/
755+
exports.shouldCorrectlyUseMinMaxForSettingRangeInEnsureIndex = function(test) {
756+
// Establish connection to db
757+
client.createCollection('shouldCorrectlyUseMinMaxForSettingRangeInEnsureIndex', function(err, collection) {
758+
test.equal(null, err);
759+
760+
collection.ensureIndex({loc:'2d'}, {min:200, max:1400, safe:true}, function(err, indexName) {
761+
test.equal(null, err);
762+
763+
collection.insert({loc:[600, 600]}, {safe:true}, function(err, result) {
764+
test.equal(null, err);
765+
test.done();
766+
});
767+
});
768+
});
769+
}
770+
752771
/**
753772
* Retrieve the server information for the current
754773
* instance of the db client

0 commit comments

Comments
 (0)