summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-04-29 07:12:52 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-04-29 07:12:52 +0000
commitb43ebcbdc4a41d7b5aafc9ffde6268d952da208f (patch)
tree2a90a2f89ddf3c1d7ada48aeaff1a050dc8c7b58
parent55fd2f55626f5af38305ce5fdfa14c025ec1a2ca (diff)
downloadredmine-b43ebcbdc4a41d7b5aafc9ffde6268d952da208f.tar.gz
redmine-b43ebcbdc4a41d7b5aafc9ffde6268d952da208f.zip
Merged r5186 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@5576 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/views/wiki/date_index.html.erb4
-rw-r--r--app/views/wiki/index.html.erb4
-rw-r--r--test/functional/wiki_controller_test.rb8
3 files changed, 12 insertions, 4 deletions
diff --git a/app/views/wiki/date_index.html.erb b/app/views/wiki/date_index.html.erb
index 65af6084e..a0327cf4c 100644
--- a/app/views/wiki/date_index.html.erb
+++ b/app/views/wiki/date_index.html.erb
@@ -23,11 +23,11 @@
<% unless @pages.empty? %>
<% other_formats_links do |f| %>
- <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'show', :id => @project, :show_wiki_edits => 1, :key => User.current.rss_key} %>
+ <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :key => User.current.rss_key} %>
<%= f.link_to('HTML', :url => {:action => 'export'}) if User.current.allowed_to?(:export_wiki_pages, @project) %>
<% end %>
<% end %>
<% content_for :header_tags do %>
-<%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'show', :id => @project, :show_wiki_edits => 1, :format => 'atom', :key => User.current.rss_key) %>
+<%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :format => 'atom', :key => User.current.rss_key) %>
<% end %>
diff --git a/app/views/wiki/index.html.erb b/app/views/wiki/index.html.erb
index 7e7155fda..e85f83b91 100644
--- a/app/views/wiki/index.html.erb
+++ b/app/views/wiki/index.html.erb
@@ -16,11 +16,11 @@
<% unless @pages.empty? %>
<% other_formats_links do |f| %>
- <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'show', :id => @project, :show_wiki_edits => 1, :key => User.current.rss_key} %>
+ <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :key => User.current.rss_key} %>
<%= f.link_to('HTML', :url => {:action => 'export'}) if User.current.allowed_to?(:export_wiki_pages, @project) %>
<% end %>
<% end %>
<% content_for :header_tags do %>
-<%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'show', :id => @project, :show_wiki_edits => 1, :format => 'atom', :key => User.current.rss_key) %>
+<%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :format => 'atom', :key => User.current.rss_key) %>
<% end %>
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb
index 981ebf8dd..65fa86787 100644
--- a/test/functional/wiki_controller_test.rb
+++ b/test/functional/wiki_controller_test.rb
@@ -386,6 +386,11 @@ class WikiControllerTest < ActionController::TestCase
:child => { :tag => 'li', :child => { :tag => 'a', :attributes => { :href => '/projects/ecookbook/wiki/Another_page' },
:content => 'Another page' } }
end
+
+ def test_index_should_include_atom_link
+ get :index, :project_id => 'ecookbook'
+ assert_tag 'a', :attributes => { :href => '/projects/ecookbook/activity.atom?show_wiki_edits=1'}
+ end
context "GET :export" do
context "with an authorized user to export the wiki" do
@@ -425,6 +430,9 @@ class WikiControllerTest < ActionController::TestCase
should_assign_to :pages_by_date
should_render_template 'wiki/date_index'
+ should "include atom link" do
+ assert_tag 'a', :attributes => { :href => '/projects/ecookbook/activity.atom?show_wiki_edits=1'}
+ end
end
def test_not_found