about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/microformats/parser_expectations.clj21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/microformats/parser_expectations.clj b/test/microformats/parser_expectations.clj
index 1783af5..455a26f 100644
--- a/test/microformats/parser_expectations.clj
+++ b/test/microformats/parser_expectations.clj
@@ -24,6 +24,27 @@
              snippet :content
              (#'microformats.parser/node-to-text)))
 
+(expect '({:tag :div :attrs {:class "h-card"}
+                   :content nil})
+                (select-h (snippet
+                           "<div class=\"h-card\"></div>")))
+
+(expect '({:tag :div :attrs {:class "h-card"}
+                   :content ({:tag :a :attrs {:class "h-org"}
+                              :content nil})})
+                (select-h (snippet
+                           "<div class=\"h-card\"><a class=\"h-org\"></a></div>")))
+
+(expect '({:tag :div :attrs {:class "h-card"}
+                   :content ("\n"
+                             {:tag :p :attrs nil
+                              :content ({:tag :a :attrs {:class "h-org"}
+                                         :content nil})}
+                             "\n")})
+        (select-h (snippet "<div class=\"h-card\">
+<p><a class=\"h-org\"></a></p>
+</div>")))
+
 (expect {:name '("Name")}
         (parse-p (snippet "<p class=\"p-name\"><span class=\"value\">Name</span></p>")))