mirror of
https://github.com/zebrajr/express.git
synced 2025-12-06 00:19:48 +01:00
tests: add test for rendering extensionless file without view engine
This commit is contained in:
parent
60e2008dee
commit
0634e7e189
|
|
@ -34,6 +34,20 @@ describe('res', function(){
|
|||
.expect('<p>tobi</p>', done);
|
||||
})
|
||||
|
||||
it('should error without "view engine" set and no file extension', function (done) {
|
||||
var app = createApp();
|
||||
|
||||
app.locals.user = { name: 'tobi' };
|
||||
|
||||
app.use(function(req, res){
|
||||
res.render(__dirname + '/fixtures/user');
|
||||
});
|
||||
|
||||
request(app)
|
||||
.get('/')
|
||||
.expect(500, /No default engine was specified/, done);
|
||||
})
|
||||
|
||||
it('should expose app.locals', function(done){
|
||||
var app = createApp();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user