cleanup
[fnpeditor.git] / modules / documentCanvas / tests / canvas.test.js
index 7515309..35f0d85 100644 (file)
@@ -136,6 +136,28 @@ define([
                 </section>');\r
 \r
         });\r
+        \r
+        test('remove list', function() {\r
+            var xml = '\\r
+                <section>\\r
+                    <div class="list.items">\\r
+                        <div class="item">Alice</div>\\r
+                        <div class="item">has</div>\\r
+                        <div class="item">a cat</div>\\r
+                    </div>\\r
+                    <div>some text</div>\\r
+                </section>';\r
+           var c = new canvas.Canvas(xml);\r
+           var item = c.getNode({klass: 'item'})[1];\r
+           c.removeList({pointer: item});\r
+           assert.xmlEqual(c.toXML(), '\\r
+                <section>\\r
+                    <div>Alice</div>\\r
+                    <div>has</div>\\r
+                    <div>a cat</div>\\r
+                    <div>some text</div>\\r
+                </section>');\r
+        });\r
     });\r
 \r
 });
\ No newline at end of file