diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/microformats/parser_test.clj | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/microformats/parser_test.clj b/test/microformats/parser_test.clj index 7d837f2..51c45c7 100644 --- a/test/microformats/parser_test.clj +++ b/test/microformats/parser_test.clj @@ -121,3 +121,12 @@ (are [ex in] (= ex (parse-e (first (html-snippet in)))) {:content {:html "Here is a load of <strong>embedded markup</strong>" :value "Here is a load of embedded markup"}} "<div class=\"e-content\">Here is a load of <strong>embedded markup</strong></div>"))) + +(deftest parse-rel-test + (testing "link and a tags with rel attributes should be parsed" + (are [ex in] (= ex (parse-rels (html-snippet in))) + {:author ["http://example.com/a"]} + "<a rel=\"author\" href=\"http://example.com/a\">author a</a>" + + {:author ["http://example.com/a" "http://example.com/b"]} + "<a rel=\"author\" href=\"http://example.com/a\">author a</a><a rel=\"author\" href=\"http://example.com/b\">author b</a>"))) |