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.clj29
1 files changed, 15 insertions, 14 deletions
diff --git a/test/microformats/parser_expectations.clj b/test/microformats/parser_expectations.clj
index 455a26f..5f8eeef 100644
--- a/test/microformats/parser_expectations.clj
+++ b/test/microformats/parser_expectations.clj
@@ -1,6 +1,7 @@
 (ns microformats.parser-expectations
   (:require [expectations :refer :all]
             [microformats.parser :refer :all]
+            [clojure.zip :as z]
             [net.cgrand.enlive-html :refer [html-snippet]]))
 
 (defn- snippet
@@ -25,25 +26,25 @@
              (#'microformats.parser/node-to-text)))
 
 (expect '({:tag :div :attrs {:class "h-card"}
-                   :content nil})
-                (select-h (snippet
-                           "<div class=\"h-card\"></div>")))
+           :content nil})
+        (select-h (z/xml-zip (html-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>")))
+           :content ({:tag :a :attrs {:class "h-org"}
+                      :content nil})})
+        (select-h (z/xml-zip (html-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\">
+           :content ("\n"
+                     {:tag :p :attrs nil
+                      :content ({:tag :a :attrs {:class "h-org"}
+                                 :content nil})}
+                     "\n")})
+        (select-h (z/xml-zip (html-snippet "<div class=\"h-card\">
 <p><a class=\"h-org\"></a></p>
-</div>")))
+</div>"))))
 
 (expect {:name '("Name")}
         (parse-p (snippet "<p class=\"p-name\"><span class=\"value\">Name</span></p>")))