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_test.clj9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/microformats/parser_test.clj b/test/microformats/parser_test.clj
index 63c7708..504ac24 100644
--- a/test/microformats/parser_test.clj
+++ b/test/microformats/parser_test.clj
@@ -8,6 +8,15 @@
     (is (= {:items [] :rels {}}
            (parse "")))))
 
+(deftest classes-to-props-property-names
+  (testing "`classes-to-props' should return property name without prefix"
+    (are [ex in] (= ex (into [] ((classes-to-props "p-") in)))
+         [:location]
+         ["someclass" "p-location" "someotherclass"]
+
+         [:location :name]
+         ["someclass" "p-location" "someotherclass" "p-name"])))
+
 (deftest parse-p-inner-text
   (testing "Inner text of a p- property should be parsed")
   (are [ex in] (= ex (parse-p (first (html-snippet in))))