diff options
author | Go MAEDA <maeda@farend.jp> | 2024-06-13 03:06:04 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2024-06-13 03:06:04 +0000 |
commit | af6a627d205fba99a8bda29b0e0bfea0a766506e (patch) | |
tree | 1129ace4f09b4a135a94a5cc89d8e17b80033c23 /test/functional/wiki_controller_test.rb | |
parent | b803bddb1f32842b0a5ec93640778d902b5f7999 (diff) | |
download | redmine-af6a627d205fba99a8bda29b0e0bfea0a766506e.tar.gz redmine-af6a627d205fba99a8bda29b0e0bfea0a766506e.zip |
Revisions count is wrong on the wiki content page (#40655).
Contributed by Karel Pičman (@picman).
git-svn-id: https://svn.redmine.org/redmine/trunk@22877 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/wiki_controller_test.rb')
-rw-r--r-- | test/functional/wiki_controller_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index d7e9676f8..be62dcc8e 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -233,6 +233,20 @@ class WikiControllerTest < Redmine::ControllerTest end end + def test_show_should_display_revisions_count + # To ensure that the number of versions is correctly displayed instead of + # the last version number of the wiki page, make a situation where the + # those two numbers are different. + content_versions = WikiContentVersion.where(page_id: 1) + content_versions.first.destroy + assert 3, content_versions.last.version + assert 2, content_versions.size + + get :show, :params => {:project_id => 1, :id => 'CookBook_documentation'} + assert_response :success + assert_select 'a[href=?]', '/projects/1/wiki/CookBook_documentation/history', :text => /2 revisions/ + end + def test_get_new @request.session[:user_id] = 2 |