summaryrefslogtreecommitdiff
path: root/test/rss
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-16 09:01:18 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-16 09:01:18 +0000
commit277f48de57ce32717ed6de16c4d96900b237fbf8 (patch)
tree789f202036ad19b2830f94ac691d2766ee57465b /test/rss
parent28e7beb54c560a43f72e55d512c4f09b55061030 (diff)
downloadruby-277f48de57ce32717ed6de16c4d96900b237fbf8.tar.gz
* lib/rss/maker/base.rb, lib/rss/maker/1.0.rb, lib/rss/maker/feed.rb,
test/rss/test_maker_1.0.rb, test/rss/test_maker_atom_feed.rb: RSS 1.0 and Atom feed maker treat maker.channel.language as maker.channel.dc_language. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss')
-rw-r--r--test/rss/test_maker_1.0.rb20
-rw-r--r--test/rss/test_maker_atom_feed.rb9
2 files changed, 29 insertions, 0 deletions
diff --git a/test/rss/test_maker_1.0.rb b/test/rss/test_maker_1.0.rb
index ab6f6ade6b..47bfe99ba2 100644
--- a/test/rss/test_maker_1.0.rb
+++ b/test/rss/test_maker_1.0.rb
@@ -95,6 +95,26 @@ module RSS
assert_equal(rss.textinput.about, channel.textinput.resource)
end
+ def test_channel_language
+ about = "http://hoge.com"
+ title = "fugafuga"
+ link = "http://hoge.com"
+ description = "fugafugafugafuga"
+ language = "ja"
+
+ rss = RSS::Maker.make("1.0") do |maker|
+ maker.channel.about = about
+ maker.channel.title = title
+ maker.channel.link = link
+ maker.channel.description = description
+ maker.channel.language = language
+
+ setup_dummy_item(maker)
+ end
+ channel = rss.channel
+ assert_equal(language, channel.dc_language)
+ end
+
def test_not_valid_channel
about = "http://hoge.com"
title = "fugafuga"
diff --git a/test/rss/test_maker_atom_feed.rb b/test/rss/test_maker_atom_feed.rb
index 378cf9ac31..8b32189b9d 100644
--- a/test/rss/test_maker_atom_feed.rb
+++ b/test/rss/test_maker_atom_feed.rb
@@ -392,5 +392,14 @@ module RSS
setup_dummy_item_atom(maker)
end
end
+
+ def test_language
+ language = "ja"
+ feed = Maker.make("atom") do |maker|
+ setup_dummy_channel_atom(maker)
+ maker.channel.language = "ja"
+ end
+ assert_equal(language, feed.dc_language)
+ end
end
end