summaryrefslogtreecommitdiff
path: root/test/rss
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-16 09:08:58 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-16 09:08:58 +0000
commitb49be81dbb422c4e349555a6dcf0bf7b4ed5aad3 (patch)
tree1162ee69ee8d2d8408ed0ee6a9e9424b639ae900 /test/rss
parenta7cf993f2522c28d94867cbb1765a9718c3d7554 (diff)
* lib/rss/maker/feed.rb, test/test_maker_atom_feed.rb:
remove needless codes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss')
-rw-r--r--test/rss/test_maker_atom_feed.rb28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/rss/test_maker_atom_feed.rb b/test/rss/test_maker_atom_feed.rb
index 7a2bb63..2ca67e7 100644
--- a/test/rss/test_maker_atom_feed.rb
+++ b/test/rss/test_maker_atom_feed.rb
@@ -408,12 +408,38 @@ module RSS
setup_dummy_channel_atom(maker)
maker.items.new_item do |item|
item.link = "http://example.com/article.html"
- item.title = "Sample Article"
+ item.title = "sample article"
item.date = date
end
end
assert_equal(date, feed.items[0].updated.content)
assert_equal([date], feed.items[0].dc_dates.collect {|date| date.value})
end
+
+ def test_channel_dc_date
+ date = Time.parse("2004/11/1 10:10")
+ feed = Maker.make("atom") do |maker|
+ setup_dummy_channel_atom(maker)
+ maker.channel.updated = nil
+ maker.channel.dc_date = date
+ setup_dummy_item_atom(maker)
+ end
+ assert_equal(date, feed.updated.content)
+ assert_equal([date], feed.dc_dates.collect {|date| date.value})
+ end
+
+ def test_item_dc_date
+ date = Time.parse("2004/11/1 10:10")
+ feed = Maker.make("atom") do |maker|
+ setup_dummy_channel_atom(maker)
+ maker.items.new_item do |item|
+ item.link = "http://example.com/article.html"
+ item.title = "sample article"
+ item.dc_date = date
+ end
+ end
+ assert_equal(date, feed.items[0].updated.content)
+ assert_equal([date], feed.items[0].dc_dates.collect {|date| date.value})
+ end
end
end