Permalink
Browse files

[test] Add a failing test for overriding with bad content

Tests #107.
  • Loading branch information...
1 parent a291b1d commit 77752fc931ad2085e6336d049c697ed8c4c77582 @mmalecki mmalecki committed May 10, 2013
Showing with 37 additions and 0 deletions.
  1. +9 −0 test/api-test.js
  2. +10 −0 test/fixtures/test-42.html
  3. +8 −0 test/fixtures/test-42.json
  4. +10 −0 test/fixtures/test-42.out
View
@@ -504,6 +504,15 @@ vows.describe('merge data into markup').addBatch({
return common.createTest('test-41', map);
}()
+ ),
+
+ '(42) Should not replace element content': (
+
+ function() {
+ var map = Plates.Map();
+
+ return common.createTest('test-42', map);
+ }()
)
}
View
@@ -0,0 +1,10 @@
+<div>
+ <div class="page-details">
+ <div class="author">
+ <div class="name"></div>
+ </div>
+ </div>
+ <div class="page-details">
+ <h1 class="title"></h1>
+ </div>
+</div>
@@ -0,0 +1,8 @@
+{
+ "page-details": {
+ "author": {
+ "name": "Maciej"
+ },
+ "title": "Title"
+ }
+}
View
@@ -0,0 +1,10 @@
+<div>
+ <div class="page-details">
+ <div class="author">
+ <div class="name">Maciej</div>
+ </div>
+ </div>
+ <div class="page-details">
+ <h1 class="title">Plates</h1>
+ </div>
+</div>

0 comments on commit 77752fc

Please sign in to comment.