Permalink
Browse files

Add test for XMLFragment.prototype.importXMLBuilder()

  • Loading branch information...
1 parent c544ea0 commit 1e79c35eaeb2d0ae4e8c602ce04983ea641e220c @piroor piroor committed Jul 26, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 test/test.coffee
View
@@ -193,3 +193,13 @@ test11cloned = test11.root().clone(true)
test11cloned.ele('added', '3')
assert.strictEqual(xml11cloned, test11cloned.toString())
assert.strictEqual(xml11, test11.doc().toString())
+
+# Test the importXMLBuilder() method
+xml12 = '<test12><test12imported><node>imported</node></test12imported></test12>'
+test12imported = xmlbuilder.create().begin('test12imported')
+ .ele('node', 'imported')
+ .doc()
+test12 = builder.begin('test12')
+ .importXMLBuilder(test12imported)
+ .doc().toString()
+assert.strictEqual(xml12, test12)

0 comments on commit 1e79c35

Please sign in to comment.