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