aboutsummaryrefslogtreecommitdiffstats
path: root/test/rss
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-12 14:52:11 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-12 14:52:11 +0000
commit06dfb68d5465a42857842e549349d243b66205c2 (patch)
tree7e238d3a446521501a8e7ebeb5b08200cd73ef5c /test/rss
parentf6f3d1bc0e24cca8e369b09c68c26813a414248a (diff)
downloadruby-06dfb68d5465a42857842e549349d243b66205c2.tar.gz
* lib/rss/maker/base.rb, test/rss/test_maker_0.9.rb:
accept any time format in maker. [ruby-core:26923] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss')
-rw-r--r--test/rss/test_maker_0.9.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/rss/test_maker_0.9.rb b/test/rss/test_maker_0.9.rb
index 32aa183756..c36a0be580 100644
--- a/test/rss/test_maker_0.9.rb
+++ b/test/rss/test_maker_0.9.rb
@@ -453,5 +453,22 @@ module RSS
end
assert_nil(rss.channel.textInput)
end
+
+ def test_date_in_string
+ date = Time.now
+
+ rss = RSS::Maker.make("0.91") do |maker|
+ setup_dummy_channel(maker)
+ setup_dummy_image(maker)
+
+ maker.items.new_item do |item|
+ item.title = "The first item"
+ item.link = "http://example.com/blog/1.html"
+ item.date = date.rfc822
+ end
+ end
+
+ assert_equal(date.iso8601, rss.items[0].date.iso8601)
+ end
end
end