From bb1425c6f76e883bf67c03c0aa368e654fa89786 Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Thu, 28 Apr 2005 23:52:44 +0000 Subject: [PATCH] Fixed a silly error in pubDate generation (RSS feed) --- app/views/wiki/rss_feed.rhtml | 2 +- test/functional/wiki_controller_test.rb | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/views/wiki/rss_feed.rhtml b/app/views/wiki/rss_feed.rhtml index a33131a3..a0267ff4 100644 --- a/app/views/wiki/rss_feed.rhtml +++ b/app/views/wiki/rss_feed.rhtml @@ -12,7 +12,7 @@ <% unless @hide_description %> <%= h page.display_content %> <% end %> - <%= page.created_at.getgm.strftime "%a, %e %b %Y %H:%M:%S Z" %> + <%= page.created_at.getgm.strftime "%a, %d %b %Y %H:%M:%S Z" %> <%= url_for :only_path => false, :web => @web_name, :action => @link_action, :id => page.name %> <%= url_for :only_path => false, :web => @web_name, :action => @link_action, :id => page.name %> <%= WikiWords.separate(page.author) %> diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 2ee95cff..8e5bb847 100755 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -475,6 +475,17 @@ class WikiControllerTest < Test::Unit::TestCase assert r.body.include?('Home Page') assert r.body.include?('Title&With&Ampersands') end + + def test_rss_timestamp + setup_wiki_with_three_pages + + new_page = @wiki.write_page('wiki1', 'PageCreatedAtTheBeginningOfCtime', + 'Created on 1 Jan 1970 at 0:00:00 Z', Time.at(0), Author.new('NitPicker', '127.0.0.3')) + + r = process 'rss_with_headlines', 'web' => 'wiki1' + + assert_template_xpath_match '/rss/channel/item/pubDate[4]', "Thu, 01 Jan 1970 00:00:00 Z" + end def test_save r = process 'save', 'web' => 'wiki1', 'id' => 'NewPage', 'content' => 'Contents of a new page',