Fixes section edit links when text includes pre/code tag (#2222).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7835 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-11-18 18:22:41 +00:00
parent 6be2e99bb6
commit b3b2eb3e50
3 changed files with 20 additions and 4 deletions
+14
View File
@@ -79,6 +79,20 @@ class WikiControllerTest < ActionController::TestCase
get :show, :project_id => 1, :id => 'Unexistent page'
assert_response 404
end
def test_show_should_display_section_edit_links
@request.session[:user_id] = 2
get :show, :project_id => 1, :id => 'Page with sections'
assert_no_tag 'a', :attributes => {
:href => '/projects/ecookbook/wiki/Page_with_sections/edit?section=1'
}
assert_tag 'a', :attributes => {
:href => '/projects/ecookbook/wiki/Page_with_sections/edit?section=2'
}
assert_tag 'a', :attributes => {
:href => '/projects/ecookbook/wiki/Page_with_sections/edit?section=3'
}
end
def test_show_unexistent_page_with_edit_right
@request.session[:user_id] = 2