Added collection "as" option test

This commit is contained in:
Tj Holowaychuk 2010-07-08 10:13:24 -07:00
parent 22100f7c3a
commit 5544c5d5d4
2 changed files with 13 additions and 0 deletions

1
test/fixtures/partials/user.jade vendored Normal file
View File

@ -0,0 +1 @@
p= person.name

View File

@ -94,5 +94,17 @@ module.exports = {
assert.response(app,
{ url: '/movies' },
{ body: html });
// "as" collection option
app.get('/user', function(req, res){
res.send(res.partial('user.jade', {
as: 'person',
collection: [{ name: 'tj' }]
}));
});
assert.response(app,
{ url: '/user' },
{ body: '<p>tj</p>' });
}
};