0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00

Fixed validator test as author_id does not exist anymore

refs https://github.com/TryGhost/Toolbox/issues/230

 - No column - no validation!
This commit is contained in:
Naz 2022-04-26 20:21:24 +08:00 committed by naz
parent 6d17d28d1a
commit 6a42c1fa3b

View file

@ -23,14 +23,14 @@ describe('Validate Schema', function () {
throw err;
}
err.length.should.eql(7);
err.length.should.eql(6);
const errorMessages = _.map(err, function (object) {
return object.message;
}).join(',');
// NOTE: Some of these fields are auto-filled in the model layer (e.g. author_id, created_at etc.)
['id', 'uuid', 'slug', 'title', 'author_id', 'created_at', 'created_by'].forEach(function (attr) {
['id', 'uuid', 'slug', 'title', 'created_at', 'created_by'].forEach(function (attr) {
errorMessages.should.match(new RegExp('posts.' + attr));
});
});