Skip to content

Commit

Permalink
Merge pull request #1567 from chadkouse/schema
Browse files Browse the repository at this point in the history
allow defaultExtension
  • Loading branch information
Eran Hammer committed Apr 24, 2014
2 parents 1dd65f1 + ee213c6 commit eb0da4b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ internals.viewSchema = function (base) {
partialsPath: Joi.string(),
helpersPath: Joi.string(),
contentType: Joi.string(),
compileMode: Joi.string().valid('sync', 'async')
compileMode: Joi.string().valid('sync', 'async'),
defaultExtension: Joi.string()
};

return Utils.merge(schema, base);
Expand Down
10 changes: 10 additions & 0 deletions test/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,15 @@ describe('Schema', function () {
expect(Schema.view(config)).to.exist;
done();
});

it('succeeds with minimal config', function(done) {
var config = {
module: "baz",
path: "foo",
defaultExtension: "bar"
};
expect(Schema.view(config)).to.not.exist;
done();
});
});
});

0 comments on commit eb0da4b

Please sign in to comment.