From e8a96393c8e6c2b5f94e43e58680ee90a2b5a6b0 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 13 Sep 2014 10:00:49 +0100 Subject: Add basic support for dt-* parsing --- test/microformats/parser_test.clj | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'test') diff --git a/test/microformats/parser_test.clj b/test/microformats/parser_test.clj index 0f712de..63c7708 100644 --- a/test/microformats/parser_test.clj +++ b/test/microformats/parser_test.clj @@ -70,3 +70,33 @@ {:photo "http://example.com/someimage.png"} "http://example.com/someimage.png"))) + +(deftest parse-dt-elements + (testing "Tags with dt-* classes should have their values parsed" + (are [ex in] (= ex (parse-dt (first (html-snippet in)))) + {:start "2012-08-05T14:50"} + "" + + {:start "2012-08-05T14:50"} + "" + + {:start "2012-08-05T14:50"} + "" + + {:end "2012-08-05T18:00"} + "" + + {:start "2012-08-05T14:50"} + "" + + {:start "2012-08-05T14:50"} + "2012-08-05T14:50" + + {:start "2012-08-05T14:50"} + "" + + {:start "2012-08-05T14:50"} + "2012-08-05T14:50" + + {:start "2012-08-05T14:50"} + ""))) -- cgit 1.4.1