diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-11-09 17:53:13 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-11-09 17:53:13 +0000 |
commit | c2fe2d0c0615b01dd61088b5e99e9b3db9eb7529 (patch) | |
tree | d24ad75f200759d98013caaa8ce5691b733d4c54 /test/functional/wiki_controller_test.rb | |
parent | 9fc0d230c8887fbaa879544a1d1c00890c2732a8 (diff) | |
download | redmine-c2fe2d0c0615b01dd61088b5e99e9b3db9eb7529.tar.gz redmine-c2fe2d0c0615b01dd61088b5e99e9b3db9eb7529.zip |
Fixed that #destroy_version with invalid version destroys wiki page content (#21155).
git-svn-id: http://svn.redmine.org/redmine/trunk@14856 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/wiki_controller_test.rb')
-rw-r--r-- | test/functional/wiki_controller_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 27772cd7c..0b86ef063 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -756,6 +756,18 @@ class WikiControllerTest < ActionController::TestCase end end + def test_destroy_invalid_version_should_respond_with_404 + @request.session[:user_id] = 2 + assert_no_difference 'WikiContent::Version.count' do + assert_no_difference 'WikiContent.count' do + assert_no_difference 'WikiPage.count' do + delete :destroy_version, :project_id => 'ecookbook', :id => 'CookBook_documentation', :version => 99 + end + end + end + assert_response 404 + end + def test_index get :index, :project_id => 'ecookbook' assert_response :success |