diff options
author | Alan Pearce | 2014-09-13 21:49:48 +0100 |
---|---|---|
committer | Alan Pearce | 2014-09-13 21:49:48 +0100 |
commit | 11c75c3e47c4afdd419c13e68fa5e0f795daa715 (patch) | |
tree | 28a74cdf54bbc4d70c2532559be880b69f88e6ce /test | |
parent | 03bc73a64af103b388f50858ad725b9fc6417782 (diff) | |
download | microformats-11c75c3e47c4afdd419c13e68fa5e0f795daa715.tar.lz microformats-11c75c3e47c4afdd419c13e68fa5e0f795daa715.tar.zst microformats-11c75c3e47c4afdd419c13e68fa5e0f795daa715.zip |
Add support for parsing rel attributes
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>"))) |