Return 404 if revision URL doesn't exist (#36561).

Patch by Mizuki ISHIKAWA.


git-svn-id: http://svn.redmine.org/redmine/trunk@21413 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2022-02-18 08:03:52 +00:00
parent f70d7a3096
commit d8263dcdee
3 changed files with 8 additions and 6 deletions

View File

@@ -201,6 +201,12 @@ class WikiControllerTest < Redmine::ControllerTest
assert_select 'select[name=?] option[value="2"][selected=selected]', 'wiki_page[parent_id]'
end
def test_show_unexistent_version_page
@request.session[:user_id] = 2
get :show, :params => {:project_id => 1, :id => 'CookBook_documentation', :version => 100}
assert_response 404
end
def test_show_should_not_show_history_without_permission
Role.anonymous.remove_permission! :view_wiki_edits
get :show, :params => {:project_id => 1, :id => 'Page with sections', :version => 2}