From 1ebede4bbab4fc1315cc0bf5fdc402a29eab34e1 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 13 Sep 2014 09:53:35 +0100 Subject: Fallback to text content if attributes are not found --- test/microformats/parser_test.clj | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/microformats/parser_test.clj b/test/microformats/parser_test.clj index 57bb9d2..0f712de 100644 --- a/test/microformats/parser_test.clj +++ b/test/microformats/parser_test.clj @@ -26,8 +26,14 @@ {:name "Example User"} "@example" + {:name "@example"} + "@example" + + {:name "Example User"} + "" + {:name "Example User"} - ""))) + "Example User"))) (deftest parse-p-empty-br-hr (testing "br and hr tags should return empty strings" @@ -57,4 +63,10 @@ "" {:photo "http://example.com/someimage.png"} - ""))) + "http://example.com/someimage.png" + + {:photo "http://example.com/someimage.png"} + "" + + {:photo "http://example.com/someimage.png"} + "http://example.com/someimage.png"))) -- cgit 1.4.1