Fixed a silly error in pubDate generation (RSS feed)
This commit is contained in:
parent
e6624b92d3
commit
bb1425c6f7
2 changed files with 12 additions and 1 deletions
|
@ -12,7 +12,7 @@
|
|||
<% unless @hide_description %>
|
||||
<description><%= h page.display_content %></description>
|
||||
<% end %>
|
||||
<pubDate><%= page.created_at.getgm.strftime "%a, %e %b %Y %H:%M:%S Z" %></pubDate>
|
||||
<pubDate><%= page.created_at.getgm.strftime "%a, %d %b %Y %H:%M:%S Z" %></pubDate>
|
||||
<guid><%= url_for :only_path => false, :web => @web_name, :action => @link_action, :id => page.name %></guid>
|
||||
<link><%= url_for :only_path => false, :web => @web_name, :action => @link_action, :id => page.name %></link>
|
||||
<dc:creator><%= WikiWords.separate(page.author) %></dc:creator>
|
||||
|
|
|
@ -475,6 +475,17 @@ class WikiControllerTest < Test::Unit::TestCase
|
|||
assert r.body.include?('<title>Home Page</title>')
|
||||
assert r.body.include?('<title>Title&With&Ampersands</title>')
|
||||
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',
|
||||
|
|
Loading…
Add table
Reference in a new issue