added "view cache" in production test

This commit is contained in:
TJ Holowaychuk
2012-02-26 11:56:49 -08:00
parent ada2d0c627
commit ac3d002cb2

View File

@@ -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';
})
})