Move field deletion logic into mongo adapter (#1471)

This commit is contained in:
Drew
2016-04-12 19:06:58 -07:00
committed by Florent Vilmart
parent f312f81cbd
commit 512251eb58
4 changed files with 84 additions and 38 deletions

View File

@@ -684,12 +684,13 @@ describe('Schema', () => {
.then(() => schema.deleteField('relationField', 'NewClass', config.database))
.then(() => schema.reloadData())
.then(() => {
expect(schema['data']['NewClass']).toEqual({
const expectedSchema = {
objectId: { type: 'String' },
updatedAt: { type: 'Date' },
createdAt: { type: 'Date' },
ACL: { type: 'ACL' }
});
};
expect(dd(schema.data.NewClass, expectedSchema)).toEqual(undefined);
done();
});
});
@@ -716,6 +717,10 @@ describe('Schema', () => {
done();
Parse.Object.enableSingleInstance();
});
})
.catch(error => {
fail(error);
done();
});
});