summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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 ab6f6ade6b2..47bfe99ba28 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 378cf9ac314..8b32189b9d2 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