mirror of
https://github.com/redmine/redmine.git
synced 2026-03-06 04:21:23 +01:00
Fixed that viewing the history of a wiki page with attachments raises an error (#12801).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11157 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
14
test/fixtures/wiki_content_versions.yml
vendored
14
test/fixtures/wiki_content_versions.yml
vendored
@@ -99,4 +99,18 @@ wiki_content_versions_006:
|
||||
version: 3
|
||||
author_id: 1
|
||||
comments:
|
||||
wiki_content_versions_007:
|
||||
data: |-
|
||||
h1. Page with an inline image
|
||||
|
||||
This is an inline image:
|
||||
|
||||
!logo.gif!
|
||||
updated_on: 2007-03-08 00:18:07 +01:00
|
||||
page_id: 4
|
||||
wiki_content_id: 4
|
||||
id: 7
|
||||
version: 1
|
||||
author_id: 1
|
||||
comments:
|
||||
|
||||
|
||||
@@ -68,6 +68,19 @@ class WikiControllerTest < ActionController::TestCase
|
||||
assert_select 'a[href=?]', '/projects/ecookbook/wiki/CookBook_documentation', :text => /Current version/
|
||||
end
|
||||
|
||||
def test_show_old_version_with_attachments
|
||||
page = WikiPage.find(4)
|
||||
assert page.attachments.any?
|
||||
content = page.content
|
||||
content.text = "update"
|
||||
content.save!
|
||||
|
||||
get :show, :project_id => 'ecookbook', :id => page.title, :version => '1'
|
||||
assert_kind_of WikiContent::Version, assigns(:content)
|
||||
assert_response :success
|
||||
assert_template 'show'
|
||||
end
|
||||
|
||||
def test_show_old_version_without_permission_should_be_denied
|
||||
Role.anonymous.remove_permission! :view_wiki_edits
|
||||
|
||||
|
||||
Reference in New Issue
Block a user