mirror of
https://github.com/zebrajr/express.git
synced 2025-12-06 12:19:51 +01:00
Added collection "as" option test
This commit is contained in:
parent
22100f7c3a
commit
5544c5d5d4
1
test/fixtures/partials/user.jade
vendored
Normal file
1
test/fixtures/partials/user.jade
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
p= person.name
|
||||
|
|
@ -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>' });
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user