Skip to content
Browse files

Add test for doc()

  • Loading branch information...
1 parent dad4423 commit 300919587119ee997b4c330fe8226e477ff537d0 @oozcitak committed
Showing with 10 additions and 0 deletions.
  1. +10 −0 test/test.coffee
View
10 test/test.coffee
@@ -146,3 +146,13 @@ builder.begin('test6')
test6 = builder.toString()
assert.strictEqual(xml6, test6)
+# Test the doc() method
+xml7 = '<test7><nodes><node>1</node><node>2</node><node>3</node></nodes></test7>'
+test7 = builder.begin('test7')
+ .ele('nodes',)
+ .ele('node', '1').up()
+ .ele('node', '2').up()
+ .ele('node', '3')
+ .doc().toString()
+assert.strictEqual(xml7, test7)
+

0 comments on commit 3009195

Please sign in to comment.
Something went wrong with that request. Please try again.