Removed page column references in validation tests

refs #10922
This commit is contained in:
Fabien O'Carroll 2019-07-23 15:35:10 +08:00
parent 1189bc823a
commit f0afbc5cc0

View File

@ -81,26 +81,22 @@ describe('Validation', function () {
}); });
it('transforms 0 and 1', function () { it('transforms 0 and 1', function () {
const post = models.Post.forge(testUtils.DataGenerator.forKnex.createPost({slug: 'test', featured: 0, page: 1})); const post = models.Post.forge(testUtils.DataGenerator.forKnex.createPost({slug: 'test', featured: 0}));
post.get('featured').should.eql(0); post.get('featured').should.eql(0);
post.get('page').should.eql(1);
return validation.validateSchema('posts', post, {method: 'insert'}) return validation.validateSchema('posts', post, {method: 'insert'})
.then(function () { .then(function () {
post.get('featured').should.eql(false); post.get('featured').should.eql(false);
post.get('page').should.eql(true);
}); });
}); });
it('keeps true or false', function () { it('keeps true or false', function () {
const post = models.Post.forge(testUtils.DataGenerator.forKnex.createPost({slug: 'test', featured: true, page: false})); const post = models.Post.forge(testUtils.DataGenerator.forKnex.createPost({slug: 'test', featured: true}));
post.get('featured').should.eql(true); post.get('featured').should.eql(true);
post.get('page').should.eql(false);
return validation.validateSchema('posts', post, {method: 'insert'}) return validation.validateSchema('posts', post, {method: 'insert'})
.then(function () { .then(function () {
post.get('featured').should.eql(true); post.get('featured').should.eql(true);
post.get('page').should.eql(false);
}); });
}); });
}); });