Skip to content

Commit

Permalink
Test case for flatiron#59
Browse files Browse the repository at this point in the history
  • Loading branch information
dougalcampbell committed Apr 12, 2012
1 parent 8ce1fe5 commit ccd9bbd
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/api-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,13 @@ vows.describe('merge data into markup').addBatch({

return common.createTest('test-20', map);
}()
),

'(21) Keep your place after handling nested objects': (

function() {
return common.createTest('test-21');
}()
)

}
Expand Down
11 changes: 11 additions & 0 deletions test/fixtures/test-21.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div id="entries">
<div class="entry">
<div class="created"></div>
<div class="user">
<div class="name"></div>
<div class="city"></div>
<div class="state"></div>
</div>
<div class="custid"></div>
</div>
</div>
31 changes: 31 additions & 0 deletions test/fixtures/test-21.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"entries": [
{
"custid": 10101,
"created": "2001-01-01",
"user": {
"name": "John Q. User",
"city": "Atlanta",
"state": "GA"
}
},
{
"custid": 20202,
"created": "2002-02-02",
"user": {
"name": "Jane Q. User",
"city": "Mobile",
"state": "AL"
}
},
{
"custid": 30303,
"created": "2003-0303",
"user": {
"name": "Professor X",
"city": "Menlo",
"state": "CA"
}
}
]
}
29 changes: 29 additions & 0 deletions test/fixtures/test-21.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div id="entries">
<div class="entry">
<div class="created">2001-01-01</div>
<div class="user">
<div class="name">John Q. User</div>
<div class="city">Atlanta</div>
<div class="state">GA</div>
</div>
<div class="custid">10101</div>
</div>
<div class="entry">
<div class="created">2002-02-02</div>
<div class="user">
<div class="name">Jane Q. User</div>
<div class="city">Mobile</div>
<div class="state">AL</div>
</div>
<div class="custid">20202</div>
</div>
<div class="entry">
<div class="created">2003-0303</div>
<div class="user">
<div class="name">Professor X</div>
<div class="city">Menlo</div>
<div class="state">CA</div>
</div>
<div class="custid">30303</div>
</div>
</div>

0 comments on commit ccd9bbd

Please sign in to comment.