about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorAlan Pearce2014-09-10 19:03:56 +0100
committerAlan Pearce2014-09-10 19:03:56 +0100
commitcba956458645f10a83d9f44f40b30e422de8ec63 (patch)
tree882b7f527557f211edfab4246bd6fe2a46f36c52 /test
parentfc18e6363dcb0befca0088a66284b05979ee3036 (diff)
downloadmicroformats-cba956458645f10a83d9f44f40b30e422de8ec63.tar.lz
microformats-cba956458645f10a83d9f44f40b30e422de8ec63.tar.zst
microformats-cba956458645f10a83d9f44f40b30e422de8ec63.zip
Create test & implementation for p-name parsing
Diffstat (limited to 'test')
-rw-r--r--test/microformats/parser_test.clj7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/microformats/parser_test.clj b/test/microformats/parser_test.clj
index 5bdf9ad..9720ad2 100644
--- a/test/microformats/parser_test.clj
+++ b/test/microformats/parser_test.clj
@@ -1,8 +1,13 @@
 (ns microformats.parser-test
   (:require [clojure.test :refer :all]
-            [microformats.core :refer :all]))
+            [microformats.parser :refer :all]))
 
 (deftest empty-document
   (testing "Empty HTML document should return an empty 'items' array and 'rels' hash."
     (is (= {:items [] :rels {}}
            (parse "")))))
+
+(deftest parse-p-inner-text
+  (testing "Inner text of a p- property should be parsed")
+  (is (= {:items [{:properties {:name "Example User"}}] :rels {}}
+         (parse "<div class=\"h-card\"><p class=\"p-name\">Example User</p></div>"))))