Skip to content

Commit 8c2f214

Browse files
committed
Fix code coverage
1 parent 98f2af0 commit 8c2f214

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

apps/meteor/ee/tests/unit/server/apps/AppRealStorage.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,15 @@ describe('AppRealStorage', () => {
174174

175175
expect(mockDb.findOneAndUpdate.calledWith({ _id: 'test-id' }, { $set: updatedItem }, { returnDocument: 'after' })).to.be.true;
176176
});
177+
178+
it('should not unset permissionsGranted when no options are passed', async () => {
179+
const updatedItem = { ...mockAppStorageItem, _id: 'test-id' };
180+
mockDb.findOneAndUpdate.resolves(updatedItem);
181+
182+
await storage.updatePartialAndReturnDocument(updatedItem);
183+
184+
expect(mockDb.findOneAndUpdate.calledWith({ _id: 'test-id' }, { $set: updatedItem }, { returnDocument: 'after' })).to.be.true;
185+
});
177186
});
178187

179188
describe('updateStatus', () => {

0 commit comments

Comments
 (0)