@@ -53,9 +53,9 | |||||
53 | <% end %> |
|
53 | <% end %> | |
54 |
|
54 | |||
55 | <% other_formats_links do |f| %> |
|
55 | <% other_formats_links do |f| %> | |
56 |
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => |
|
56 | <%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %> | |
57 |
<%= f.link_to 'HTML', :url => {:id => @page.title, :version => |
|
57 | <%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %> | |
58 |
<%= f.link_to 'TXT', :url => {:id => @page.title, :version => |
|
58 | <%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %> | |
59 | <% end if User.current.allowed_to?(:export_wiki_pages, @project) %> |
|
59 | <% end if User.current.allowed_to?(:export_wiki_pages, @project) %> | |
60 |
|
60 | |||
61 | <% content_for :header_tags do %> |
|
61 | <% content_for :header_tags do %> |
@@ -45,6 +45,13 class WikiControllerTest < ActionController::TestCase | |||||
45 | :child => { :tag => 'a', :attributes => { :href => '/projects/ecookbook/wiki/Page_with_an_inline_image' }, |
|
45 | :child => { :tag => 'a', :attributes => { :href => '/projects/ecookbook/wiki/Page_with_an_inline_image' }, | |
46 | :content => 'Page with an inline image' } } |
|
46 | :content => 'Page with an inline image' } } | |
47 | end |
|
47 | end | |
|
48 | ||||
|
49 | def test_export_link | |||
|
50 | Role.anonymous.add_permission! :export_wiki_pages | |||
|
51 | get :show, :project_id => 'ecookbook' | |||
|
52 | assert_response :success | |||
|
53 | assert_tag 'a', :attributes => {:href => '/projects/ecookbook/wiki/CookBook_documentation.txt'} | |||
|
54 | end | |||
48 |
|
55 | |||
49 | def test_show_page_with_name |
|
56 | def test_show_page_with_name | |
50 | get :show, :project_id => 1, :id => 'Another_page' |
|
57 | get :show, :project_id => 1, :id => 'Another_page' |
General Comments 0
You need to be logged in to leave comments.
Login now