mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
data refactoring cleanups in some tests
This commit is contained in:
@@ -4,7 +4,7 @@ test("livedata - basics", function () {
|
||||
assert.isTrue(Meteor.is_client);
|
||||
assert.isFalse(Meteor.is_server);
|
||||
|
||||
var coll = Meteor.Collection("testing");
|
||||
var coll = new Meteor.Collection("testing");
|
||||
|
||||
coll.remove({foo: 'bar'});
|
||||
assert.length(coll.find({foo: 'bar'}).fetch(), 0);
|
||||
|
||||
@@ -21,6 +21,7 @@ Package.on_use(function (api) {
|
||||
|
||||
Package.on_test(function (api) {
|
||||
api.use('livedata', ['client', 'server']);
|
||||
api.use('mongo-livedata', ['client', 'server']);
|
||||
api.use('tinytest');
|
||||
api.add_files('livedata_tests.js', 'client');
|
||||
});
|
||||
|
||||
@@ -531,7 +531,7 @@ LocalCollection._exprForConstraint = function (type, arg, others,
|
||||
// mongo doesn't support $regex inside a $not for some reason. we
|
||||
// do, because there's no reason not to that I can see.. but maybe
|
||||
// we should follow mongo's behavior?
|
||||
expr = '!' + Collection._exprForOperatorTest(arg, literals);
|
||||
expr = '!' + LocalCollection._exprForOperatorTest(arg, literals);
|
||||
search = null;
|
||||
} else {
|
||||
throw Error("Unrecognized key in selector: " + type);
|
||||
|
||||
@@ -38,6 +38,7 @@ Meteor.Collection = function (name, manager, driver) {
|
||||
},
|
||||
|
||||
// Apply an update from the server.
|
||||
// XXX better specify this interface (not in terms of a wire message)?
|
||||
update: function (msg) {
|
||||
var doc = self._collection.findOne(msg.id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user