diff --git a/test/app.js b/test/app.js index 51397de4..d3130e7b 100644 --- a/test/app.js +++ b/test/app.js @@ -53,4 +53,20 @@ describe('app.path()', function(){ blog.path().should.equal('/blog'); blogAdmin.path().should.equal('/blog/admin'); }) +}) + +describe('in development', function(){ + it('should disable "view cache"', function(){ + var app = express(); + app.enabled('view cache').should.be.false; + }) +}) + +describe('in production', function(){ + it('should enable "view cache"', function(){ + process.env.NODE_ENV = 'production'; + var app = express(); + app.enabled('view cache').should.be.true; + process.env.NODE_ENV = 'test'; + }) }) \ No newline at end of file