Skip to content
Myr

Added "charset" option test

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent d2f9894 · Browse files · 1 file+20 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+20 added−0 removed

  • tests:+20 added−0 removed

1 file+20 added−0 removed

modified:test/res.render.js+20 added
282 unmodified lines
283 done();284 });285 })286 })287 288 describe('"charset" options', function(){289 it('should set the .charset', function(done){290 var app = express();291292 app.set('views', __dirname + '/fixtures');293294 app.use(function(req, res){295 res.render('email.jade', { charset: 'foobar' });296 });297298 request(app)299 .get('/')300 .end(function(res){301 res.headers['content-type'].should.equal('text/html; charset=foobar');302 res.body.should.equal('<p>This is an email</p>');303 done();304 });305 })306 })307})