summaryrefslogtreecommitdiff
path: root/test/clarktown/renderers
diff options
context:
space:
mode:
Diffstat (limited to 'test/clarktown/renderers')
-rw-r--r--test/clarktown/renderers/heading_block_test.clj26
1 files changed, 19 insertions, 7 deletions
diff --git a/test/clarktown/renderers/heading_block_test.clj b/test/clarktown/renderers/heading_block_test.clj
index 2196422..7647b53 100644
--- a/test/clarktown/renderers/heading_block_test.clj
+++ b/test/clarktown/renderers/heading_block_test.clj
@@ -5,25 +5,37 @@
(deftest atx-heading-renderer-test
- (testing "Hashbang heading block that's a H1"
+ (testing "ATX heading block that's a H1"
(is (= "<h1>This is a heading block.</h1>"
(heading-block/render "# This is a heading block." nil nil))))
- (testing "Hashbang heading block that's a H2"
+ (testing "ATX heading block that's a H2"
(is (= "<h2>This is a heading block.</h2>"
(heading-block/render "## This is a heading block." nil nil))))
- (testing "Hashbang heading block that's a H3"
+ (testing "ATX heading block that's a H3"
(is (= "<h3>This is a heading block.</h3>"
(heading-block/render "### This is a heading block." nil nil))))
- (testing "Hashbang heading block that's a H4"
+ (testing "ATX heading block that's a H4"
(is (= "<h4>This is a heading block.</h4>"
(heading-block/render "#### This is a heading block." nil nil))))
- (testing "Hashbang heading block that's a H5"
+ (testing "ATX heading block that's a H5"
(is (= "<h5>This is a heading block.</h5>"
- (heading-block/render "##### This is a heading block." nil nil)))))
+ (heading-block/render "##### This is a heading block." nil nil))))
+
+ (testing "ATX heading block that's a H6"
+ (is (= "<h6>This is a heading block.</h6>"
+ (heading-block/render "###### This is a heading block." nil nil))))
+
+ (testing "No H tag when 7 or more # characters"
+ (is (= "####### This is not a heading block."
+ (heading-block/render "####### This is not a heading block." nil nil))))
+
+ (testing "No H tag when there is no space between # characters and value"
+ (is (= "#This is not a heading block."
+ (heading-block/render "#This is not a heading block." nil nil)))))
(deftest settext-heading-renderer-text
@@ -41,4 +53,4 @@
(testing "Settext heading block that's a H2 spanning multiple lines"
(is (= "<h2>This is a \nheading block spanning multiple lines.</h2>"
- (heading-block/render "This is a \nheading block spanning multiple lines.\n--------" nil nil))))) \ No newline at end of file
+ (heading-block/render "This is a \nheading block spanning multiple lines.\n--------" nil nil)))))