diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-10 21:38:11 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-10 21:38:11 +0000 |
commit | d0ffc0575a65dda03025d1d4e112ebd06f47ae7e (patch) | |
tree | b66ad02bce0b96ece5a70865a33ad834b2a5215f /test/functional/wiki_controller_test.rb | |
parent | a103e0cd26fd1ffc8772a7f3ee27eb626fa2e722 (diff) | |
download | redmine-d0ffc0575a65dda03025d1d4e112ebd06f47ae7e.tar.gz redmine-d0ffc0575a65dda03025d1d4e112ebd06f47ae7e.zip |
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
Diffstat (limited to 'test/functional/wiki_controller_test.rb')
-rw-r--r-- | test/functional/wiki_controller_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 05f4eb3af..7bd89c20d 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -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 |