aboutsummaryrefslogtreecommitdiff
path: root/tests/html_generation_tests.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-12-14 14:57:24 +0000
committerMichael Williamson <mike@zwobble.org>2013-12-14 14:57:24 +0000
commit3f954497eba0ae33e17adfd127068dedf2bfa462 (patch)
treef5d9b5b227a2c54cf046b2ffa18d5871d330f9b6 /tests/html_generation_tests.py
parentee4f5998d6ee0ec390dd1d126619d89ec16ac0dd (diff)
Don't write elements
Diffstat (limited to 'tests/html_generation_tests.py')
-rw-r--r--tests/html_generation_tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/html_generation_tests.py b/tests/html_generation_tests.py
index 395af30..757ff62 100644
--- a/tests/html_generation_tests.py
+++ b/tests/html_generation_tests.py
@@ -24,3 +24,13 @@ def all_elements_are_closed_by_end_all():
generator.text("Hello!")
generator.end_all()
assert_equal("<p><span>Hello!</span></p>", generator.html_string())
+
+
+@istest
+def elements_with_no_text_are_not_generator():
+ generator = HtmlGenerator()
+ generator.start("p")
+ generator.start("span")
+ generator.end_all()
+ assert_equal("", generator.html_string())
+