Skip to content
Myr

charset tests using ISO-8859-1

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 f7b53d3 · Browse files · 2 files+8 added−8 removed
This commit

State

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

Diff stats

2 files+8 added−8 removed

  • tests:+8 added−8 removed

2 files+8 added−8 removed

modified:test/response.test.js+2 added-2 removed
566 unmodified lines
567 'test .charset with res.send()': function(){568 var app = express.createServer();569570 app.get('/', function(req, res){571 res.charset = 'utf8';571 res.charset = 'ISO-8859-1';572 res.send('<p>hey</p>');573 });574575 assert.response(app,576 { url: '/' },577 { headers: { 'Content-Type': 'text/html; charset=utf8' }});577 { headers: { 'Content-Type': 'text/html; charset=ISO-8859-1' }});578 }579};
modified:test/view.test.js+6 added-6 removed
887 unmodified lines
888 'test .charset with res.render()': function(){889 var app = create();890891 app.get('/', function(req, res){892 res.charset = 'utf8';892 res.charset = 'ISO-8859-1';893 res.render('hello.jade');894 });895896 assert.response(app,897 { url: '/' },898 { headers: { 'Content-Type': 'text/html; charset=utf8' }});898 { headers: { 'Content-Type': 'text/html; charset=ISO-8859-1' }});899 },900 901 'test charset res.render() option': function(){902 var app = create();903904 app.get('/', function(req, res){905 res.render('hello.jade', { charset: 'utf8' });905 res.render('hello.jade', { charset: 'ISO-8859-1' });906 });907908 assert.response(app,909 { url: '/' },910 { headers: { 'Content-Type': 'text/html; charset=utf8' }});910 { headers: { 'Content-Type': 'text/html; charset=ISO-8859-1' }});911 },912 913 'test charset option': function(){914 var app = create();915 app.set('view options', { charset: 'utf8' });915 app.set('view options', { charset: 'ISO-8859-1' });916917 app.get('/', function(req, res){918 res.render('hello.jade');919 });920921 assert.response(app,922 { url: '/' },923 { headers: { 'Content-Type': 'text/html; charset=utf8' }});923 { headers: { 'Content-Type': 'text/html; charset=ISO-8859-1' }});924 },925 926 'test charset override': function(){927 var app = create();
11 unmodified lines