From cba956458645f10a83d9f44f40b30e422de8ec63 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 10 Sep 2014 19:03:56 +0100 Subject: Create test & implementation for p-name parsing --- test/microformats/parser_test.clj | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test') 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 "

Example User

")))) -- cgit 1.4.1