mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
- fix test: ''collection - partial allow, STRING | MONGO'
This commit is contained in:
@@ -278,13 +278,20 @@ if (Meteor.isClient) {
|
||||
|
||||
// test that if allow is called once then the collection is
|
||||
// restricted, and that other mutations aren't allowed
|
||||
testAsyncMulti("collection - partial allow, " + idGeneration, [
|
||||
function (test, expect) {
|
||||
restrictedCollectionForPartialAllowTest.update(
|
||||
'foo', {$set: {updated: true}}, expect(function (err, res) {
|
||||
test.equal(err.error, 403);
|
||||
}));
|
||||
}
|
||||
testAsyncMulti('collection - partial allow, ' + idGeneration, [
|
||||
async function(test, expect) {
|
||||
try {
|
||||
await restrictedCollectionForPartialAllowTest.updateAsync(
|
||||
'foo',
|
||||
{ $set: { updated: true } },
|
||||
{
|
||||
returnServerResultPromise: true,
|
||||
}
|
||||
);
|
||||
} catch (err) {
|
||||
test.equal(err.error, 403);
|
||||
}
|
||||
},
|
||||
]);
|
||||
|
||||
// test that if deny is called once then the collection is
|
||||
|
||||
Reference in New Issue
Block a user