- fix test: ''collection - partial allow, STRING | MONGO'

This commit is contained in:
denihs
2023-02-16 09:17:06 -04:00
parent 5f178fca6b
commit e1ca68d4d6

View File

@@ -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