Permalink
Browse files

Add test for "view engine" setting with leading ".".

  • Loading branch information...
1 parent a4b2e48 commit 75e47f2883dc00b86b0e2f3f6c7cac009055c7a6 @ericf ericf committed Jan 24, 2013
Showing with 15 additions and 0 deletions.
  1. +15 −0 test/app.engine.js
View
@@ -61,5 +61,20 @@ describe('app', function(){
done();
})
})
+
+ it('should work "view engine" with leading "."', function(done){
+ var app = express();
+
+ app.set('views', __dirname + '/fixtures');
+ app.engine('.html', render);
+ app.set('view engine', '.html');
+ app.locals.user = { name: 'tobi' };
+
+ app.render('user', function(err, str){
+ if (err) return done(err);
+ str.should.equal('<p>tobi</p>');
+ done();
+ })
+ })
})
})

0 comments on commit 75e47f2

Please sign in to comment.