Skip to content

Commit

Permalink
Merge branch 'release/0.9.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
haru committed Jun 28, 2020
2 parents 3b6ac8d + 2dabd13 commit 4fbc1d2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/wiki_extensions_settings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def update
setting.transaction do
menus.each_pair {|menu_no, menu|
menu_setting = WikiExtensionsMenu.find_or_create(@project.id, menu[:menu_no].to_i)
menu_setting.enabled = false
menu_setting.attributes = menu.permit(:enabled, :menu_no, :title, :page_name)
menu_setting.save!
}
Expand Down
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
author_url 'http://twitter.com/haru_iida'
description 'This is a Wiki Extensions plugin for Redmine'
url 'http://www.r-labs.org/projects/r-labs/wiki/Wiki_Extensions_en'
version '0.9.1'
version '0.9.2'
requires_redmine :version_or_higher => '4.0.0'

project_module :wiki_extensions do
Expand Down
12 changes: 12 additions & 0 deletions test/functional/wiki_extensions_settings_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ def setup
assert(menus[1].enabled)
assert_equal('my_title2', menus[1].title)
assert_equal('my_page_name2', menus[1].page_name)

menus = {}
menus[0] = {:enabled => 'true',:menu_no => 1, :title => 'my_title', :page_name => 'my_page_name'}
menus[1] = {:menu_no => 2}
post :update, :params => {
:menus => menus, :id => @project}
assert_response :redirect
setting = WikiExtensionsSetting.find_or_create @project.id
menus = setting.menus
assert(menus[0].enabled)
assert(!menus[1].enabled)

end
end

Expand Down

0 comments on commit 4fbc1d2

Please sign in to comment.