aboutsummaryrefslogtreecommitdiffstats
path: root/test/rss/test_image.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rss/test_image.rb')
-rw-r--r--test/rss/test_image.rb18
1 files changed, 14 insertions, 4 deletions
diff --git a/test/rss/test_image.rb b/test/rss/test_image.rb
index 0fb9fce276..8bb7323206 100644
--- a/test/rss/test_image.rb
+++ b/test/rss/test_image.rb
@@ -52,11 +52,11 @@ module RSS
items << make_item(image_item)
end
- ns = {
+ @ns = {
@prefix => @uri,
DC_PREFIX => DC_URI,
}
- @rss_source = make_RDF(<<-EOR, ns)
+ @rss_source = make_RDF(<<-EOR, @ns)
#{make_channel(@channel_nodes)}
#{make_image}
#{items}
@@ -70,13 +70,23 @@ EOR
assert_nothing_raised do
Parser.parse(@rss_source)
end
-
+
assert_too_much_tag("favicon", "channel") do
- Parser.parse(make_RDF(<<-EOR, {@prefix => @uri}))
+ Parser.parse(make_RDF(<<-EOR, @ns))
#{make_channel(@channel_nodes * 2)}
#{make_item}
EOR
end
+
+ attrs = {"rdf:about" => "http://www.example.org/item.png"}
+ contents = [["#{@prefix}:width", "80"]] * 5
+ image_item = make_element("#{@prefix}:item", attrs, contents)
+ assert_too_much_tag("width", "item") do
+ Parser.parse(make_RDF(<<-EOR, @ns))
+#{make_channel}
+#{make_item(image_item)}
+EOR
+ end
end
def test_favicon_accessor