Skip to content

Commit

Permalink
tests: add test for rendering extensionless file without view engine
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Jun 20, 2015
1 parent 60e2008 commit 0634e7e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/res.render.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 0634e7e

Please sign in to comment.