summaryrefslogtreecommitdiff
path: root/test/rss/test_maker_xml-stylesheet.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-03 06:43:18 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-03 06:43:18 +0000
commitd5b6a7b16947aaf4821d6b76c7de153866fb30c0 (patch)
tree450b783d2d0ee2af19ba3efb8324e73a5e0fc1d5 /test/rss/test_maker_xml-stylesheet.rb
parent0b4597eccfb5ee078e546c910f2f3cee31d3274b (diff)
* test/rss/*.rb: removed tab width configuration headers.
* test/rss/test_maker_{0.9,1.0}.rb: sort -> do_sort. * lib/rss/maker/*.rb: changed API to RSS version independence. * lib/rss/maker/base.rb (RSS::Maker::XMLStyleSheets::XMLStyleSheet): checked required (pseudo) attributes. * lib/rss/maker/base.rb (RSS::Maker::Items): sort -> do_sort. * lib/rss/rss.rb (RSS::BaseModel.install_date_element): avoided warning. * lib/rss/0.9.rb (RSS::Rss#textinput): added convenience method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss/test_maker_xml-stylesheet.rb')
-rw-r--r--test/rss/test_maker_xml-stylesheet.rb25
1 files changed, 24 insertions, 1 deletions
diff --git a/test/rss/test_maker_xml-stylesheet.rb b/test/rss/test_maker_xml-stylesheet.rb
index b959073554..bbdfdc682b 100644
--- a/test/rss/test_maker_xml-stylesheet.rb
+++ b/test/rss/test_maker_xml-stylesheet.rb
@@ -5,7 +5,7 @@ require "rss/maker"
module RSS
class TestMakerXMLStyleSheet < TestCase
- def test_rss10
+ def test_xml_stylesheet
href = 'a.xsl'
type = 'text/xsl'
title = 'sample'
@@ -47,6 +47,29 @@ module RSS
assert_equal(href, xss.href)
assert_equal(type, xss.type)
end
+
+ def test_not_valid_xml_stylesheet
+ href = 'xss.XXX'
+ type = "text/xsl"
+
+ rss = RSS::Maker.make("1.0") do |maker|
+ xss = maker.xml_stylesheets.new_xml_stylesheet
+ # xss.href = href
+ xss.type = type
+
+ setup_dummy_channel(maker)
+ end
+ assert(rss.xml_stylesheets.empty?)
+
+ rss = RSS::Maker.make("1.0") do |maker|
+ xss = maker.xml_stylesheets.new_xml_stylesheet
+ xss.href = href
+ # xss.type = type
+
+ setup_dummy_channel(maker)
+ end
+ assert(rss.xml_stylesheets.empty?)
+ end
end
end