about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorAlan Pearce2014-09-24 13:23:30 +0100
committerAlan Pearce2014-09-24 13:25:04 +0100
commitcdf600e89d0008ea42eaa60cc7b3abf0a18acff2 (patch)
treeea65a0da27fd440f876c1ec9d675d067bfabcc39 /test
parent388a6a07086c4217a907a8643b27693618c008f2 (diff)
downloadmicroformats-cdf600e89d0008ea42eaa60cc7b3abf0a18acff2.tar.lz
microformats-cdf600e89d0008ea42eaa60cc7b3abf0a18acff2.tar.zst
microformats-cdf600e89d0008ea42eaa60cc7b3abf0a18acff2.zip
Parse implied photo properties
Diffstat (limited to 'test')
-rw-r--r--test/microformats/parser_expectations.clj17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/microformats/parser_expectations.clj b/test/microformats/parser_expectations.clj
index 30e05f1..639c417 100644
--- a/test/microformats/parser_expectations.clj
+++ b/test/microformats/parser_expectations.clj
@@ -152,6 +152,23 @@
 (expect {:items [{:type ["h-card"] :properties {:name '("Example User")}}] :rels {}}
         (parse "<div class=\"h-card\"><p><abbr title=\"Example User\">Wrong</abbr></p></div>"))
 
+(expect {:items [{:type ["h-card"] :properties {:photo '("http://example.com/me.png")}}] :rels {}}
+        (parse "<object class=\"h-card\" data=\"http://example.com/me.png\"></object>"))
+
+(expect {:items [{:type ["h-card"] :properties {:name '("Example User")
+                                                :photo '("http://example.com/me.png")}}] :rels {}}
+        (parse "<div class=\"h-card\"><img alt=\"Example User\" src=\"http://example.com/me.png\"></div>"))
+
+(expect {:items [{:type ["h-card"] :properties {:photo '("http://example.com/me.png")}}] :rels {}}
+        (parse "<div class=\"h-card\"><object data=\"http://example.com/me.png\"></object></div>"))
+
+(expect {:items [{:type ["h-card"] :properties {:photo '("http://example.com/me.png")}}] :rels {}}
+        (parse "<div class=\"h-card\"><div><object data=\"http://example.com/me.png\"></object></div></div>"))
+
+(expect {:items [{:type ["h-card"] :properties {:name '("Example User")
+                                                :photo '("http://example.com/me.png")}}] :rels {}}
+        (parse "<div class=\"h-card\"><div><img alt=\"Example User\" src=\"http://example.com/me.png\"></div></div>"))
+
 (expect
  {:items [{:type ["h-adr"],
            :properties {:street-address '("665 3rd St."),