Fix silly issues with post class

This commit is contained in:
Hannah Wolfe 2019-11-06 11:02:50 +07:00
parent 6315223589
commit 814bb7da55
2 changed files with 3 additions and 5 deletions

View File

@ -14,8 +14,6 @@ module.exports = function post_class() { // eslint-disable-line camelcase
image = this.post && this.post.feature_image ? this.post.feature_image : this.feature_image || false,
page = this.post && this.post.page ? this.post.page : this.page || false;
console.log(this);
if (tags) {
classes = classes.concat(tags.map(function (tag) {
return 'tag-' + tag.slug;

View File

@ -31,7 +31,7 @@ describe('{{post_class}} helper', function () {
rendered = helpers.post_class.call(post);
should.exist(rendered);
rendered.string.should.equal('post featured no-image');
rendered.string.should.equal('post featured');
});
it('can render page class', function () {
@ -42,8 +42,8 @@ describe('{{post_class}} helper', function () {
rendered.string.should.equal('post no-image page');
});
it('can render page class without no-image class', function () {
var post = {page: true, featured_image: 'asdasdas'},
it('can render page class without no-image class', function () {
var post = {page: true, feature_image: 'asdasdas'},
rendered = helpers.post_class.call(post);
should.exist(rendered);