Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed parsing of multiple content sections

  • Loading branch information...
commit bb88f9ba1e5f74d44615471fb96adeeb40de65c0 1 parent 3c797e7
@chrisumbel chrisumbel authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 test/ejs.js
View
16 test/ejs.js
@@ -95,6 +95,22 @@ describe('parsing scripts', function() {
request(app).get('/').expect('hi++', done)
})
+
+ it('should parse multiple content sections', function(done) {
+ app.use(function(req, res){
+ res.render(__dirname + '/fixtures/viewWithContentForBody.ejs', { layout: 'layoutWithMultipleContent' })
+ })
+
+ request(app).get('/').expect('fight\\/club\nsomebody', done)
+ });
+
+ it('should parse multiple content sections and a body', function(done) {
+ app.use(function(req, res){
+ res.render(__dirname + '/fixtures/viewWithContentFor.ejs', { layout: 'layoutWithMultipleContent' })
+ })
+
+ request(app).get('/').expect('fight\\/club\nsomebody', done)
+ });
})
describe('rendering contentFor', function() {
Please sign in to comment.
Something went wrong with that request. Please try again.