Skip to content
Myr

Added test for "view options" setting

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 01b3caa · Browse files · 2 files+26 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

2 files+26 added−0 removed

  • tests:+26 added−0 removed

2 files+26 added−0 removed

added:test/fixtures/user.ejs+2 added
1<h1>{{= name }}</h1>2<p>{{= email }}</p>
modified:test/view.test.js+24 added
363 unmodified lines
364 365 assert.response(app,366 { url: '/' },367 { body: '<ul><li class="item">foo</li><li class="item">bar</li></ul>' });368 },369 370 'test "view options"': function(assert){371 var app = create();372 373 app.set('view options', {374 layout: false,375 open: '{{',376 close: '}}'377 });378 379 380 app.get('/', function(req, res, next){381 res.render('user.ejs', {382 locals: {383 name: 'tj',384 email: 'tj@vision-media.ca'385 }386 });387 });388 389 assert.response(app,390 { url: '/' },391 { body: '<h1>tj</h1><p>tj@vision-media.ca</p>' });392 }393};