aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-03-29 22:57:54 +0000
committerMichael Williamson <mike@zwobble.org>2013-03-29 22:57:54 +0000
commite51abdc358cef3655f074f4ab0e6000623ce4749 (patch)
tree1982623108807c54df0788c6738cc8e8aa48fed3 /tests
parent370a18d55e1cf97284088c5a1815f9f59ea0bcd7 (diff)
Allow styles to have CSS class
Diffstat (limited to 'tests')
-rw-r--r--tests/html-generator.tests.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/html-generator.tests.js b/tests/html-generator.tests.js
index a98ee70..f71ea59 100644
--- a/tests/html-generator.tests.js
+++ b/tests/html-generator.tests.js
@@ -36,4 +36,13 @@ describe('HtmlGenerator', function() {
generator.text("Banana");
return assert.equal(generator.asString(), "<ul><li>Apple</li><li>Banana</li></ul>");
});
+
+ test('renders class attribute of elements', function() {
+ var generator = new HtmlGenerator();
+ generator.style(styles.elements([
+ styles.element("p", {"class": "tip"})
+ ]));
+ generator.text("Hello!");
+ return assert.equal(generator.asString(), '<p class="tip">Hello!</p>');
+ });
})