Remove legacy support since all documents now have an uploaded flag.

This commit is contained in:
Tankred Hase
2017-08-22 15:26:15 +08:00
parent 2af8310070
commit fe55578268
2 changed files with 2 additions and 14 deletions

View File

@@ -144,16 +144,8 @@ describe('Public Key Integration Tests', function() {
expect(r.deletedCount).to.equal(1);
});
it('should remove an unverified key with no uploaded attribute', async () => {
delete key.uploaded;
await publicKey._persisKey(key);
const r = await publicKey._purgeOldUnverified();
expect(r.deletedCount).to.equal(1);
});
it('should not remove a verified key with no uploaded attribute', async () => {
key.userIds[0].verified = true;
delete key.uploaded;
await publicKey._persisKey(key);
const r = await publicKey._purgeOldUnverified();
expect(r.deletedCount).to.equal(0);