Remove direct mongo access from SchemaRouter.modify, Schema.deleteField.

This commit is contained in:
Nikita Lutsenko
2016-02-29 17:41:09 -08:00
parent 028ef2a7b2
commit 6893895aea
4 changed files with 93 additions and 153 deletions

View File

@@ -369,7 +369,7 @@ describe('schemas', () => {
}, (error, response, body) => {
expect(response.statusCode).toEqual(400);
expect(body.code).toEqual(Parse.Error.INVALID_CLASS_NAME);
expect(body.error).toEqual('class NoClass does not exist');
expect(body.error).toEqual('Class NoClass does not exist.');
done();
});
});
@@ -390,7 +390,7 @@ describe('schemas', () => {
}, (error, response, body) => {
expect(response.statusCode).toEqual(400);
expect(body.code).toEqual(255);
expect(body.error).toEqual('field aString exists, cannot update');
expect(body.error).toEqual('Field aString exists, cannot update.');
done();
});
})
@@ -412,7 +412,7 @@ describe('schemas', () => {
}, (error, response, body) => {
expect(response.statusCode).toEqual(400);
expect(body.code).toEqual(255);
expect(body.error).toEqual('field nonExistentKey does not exist, cannot delete');
expect(body.error).toEqual('Field nonExistentKey does not exist, cannot delete.');
done();
});
});