Skip to content
Myr

Merge branch 'fix-layouts'

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 · parents 706e32c, 31d40e5 · Browse files · 2 files+10 added−1 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+10 added−1 removed

  • tests:+10 added−1 removed
  • other:+0 added−0 removed

2 files+10 added−1 removed

modified:support/connectnot shown

Its text is not shown, modified.

modified:test/view.test.js+10 added-1 removed
13 unmodified lines
14};1516module.exports = {17 'test #render()': function(assert){18 var app = create(connect.errorHandler({ showMessage: true }));18 var app = create();19 app.set('view engine', 'jade');2021 app.get('/', function(req, res){22 res.render('index.jade', { layout: false });
94 unmodified lines
117 });118 app.get('/absolute', function(req, res){119 res.render('index.jade', { layout: __dirname + '/fixtures/layouts/foo.jade' });120 });121 app.get('/nope', function(req, res){122 res.render('index.jade', { layout: 'nope.jade' });123 });124125 assert.response(app,126 { url: '/' },127 { body: '<cool><p>Welcome</p></cool>' });
5 unmodified lines
133 { body: '<foo></foo>' });134 assert.response(app,135 { url: '/absolute' },136 { body: '<foo></foo>' });137 assert.response(app,138 { url: '/nope' },139 function(res){140 assert.ok(res.body.indexOf('Error: ENOENT') >= 0);141 assert.ok(res.body.indexOf('nope.jade') >= 0);142 });143144 beforeExit(function(){145 assert.ok(called, 'Layout callback never called'); 146 });
268 unmodified lines