diff --git a/packages/mongo/allow_tests.js b/packages/mongo/allow_tests.js index d5f06f5155..dfc5aae3fc 100644 --- a/packages/mongo/allow_tests.js +++ b/packages/mongo/allow_tests.js @@ -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