Skip to content
Myr

Added partial locals test with collection

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 f45d383 · Browse files · 1 file+19 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+19 added−0 removed

  • tests:+19 added−0 removed

1 file+19 added−0 removed

modified:test/view.test.js+19 added
484 unmodified lines
485 { url: '/' },486 { body: 'We have 5 cool pets\n' });487 },488 489 'test #partial() locals with collection': function(assert){490 var app = create();491492 app.get('/', function(req, res, next){493 res.send(res.partial('pet.jade', {494 partial: true,495 layout: false,496 collection: ['Tobi', 'Jane'],497 locals: {498 site: 'Animal land'499 }500 }));501 });502503 assert.response(app,504 { url: '/' },505 { body: '<li>Tobi is the coolest of Animal land</li><li>Jane</li>' });506 },507 508 'test #partial() inheriting initial locals': function(assert){509 var app = create();510511 app.get('/pets', function(req, res, next){
129 unmodified lines