mirror of
https://github.com/zebrajr/express.git
synced 2026-01-15 12:15:27 +00:00
Added "charset" option test
This commit is contained in:
@@ -284,4 +284,24 @@ describe('res', function(){
|
||||
});
|
||||
})
|
||||
})
|
||||
|
||||
describe('"charset" options', function(){
|
||||
it('should set the .charset', function(done){
|
||||
var app = express();
|
||||
|
||||
app.set('views', __dirname + '/fixtures');
|
||||
|
||||
app.use(function(req, res){
|
||||
res.render('email.jade', { charset: 'foobar' });
|
||||
});
|
||||
|
||||
request(app)
|
||||
.get('/')
|
||||
.end(function(res){
|
||||
res.headers['content-type'].should.equal('text/html; charset=foobar');
|
||||
res.body.should.equal('<p>This is an email</p>');
|
||||
done();
|
||||
});
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user