diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-08-30 21:05:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-08-30 21:05:22 +0000 |
commit | efabbedebe80be51b5a05bed53de3eee7ce2e68b (patch) | |
tree | 35b0f6f3ce1cde553fc2a4dfd73a78cb59392214 /test/functional/projects_controller_test.rb | |
parent | f435d1844d9eac7cbe3b374dbf4e422dca77eca1 (diff) | |
download | redmine-efabbedebe80be51b5a05bed53de3eee7ce2e68b.tar.gz redmine-efabbedebe80be51b5a05bed53de3eee7ce2e68b.zip |
Enable filtering versions on Project -> Settings -> Versions (#22608).
git-svn-id: http://svn.redmine.org/redmine/trunk@15759 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/projects_controller_test.rb')
-rw-r--r-- | test/functional/projects_controller_test.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index 423a4a045..fc261d277 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -491,6 +491,36 @@ class ProjectsControllerTest < Redmine::ControllerTest end end + def test_settings_should_accept_version_status_filter + @request.session[:user_id] = 2 + + get :settings, :id => 'ecookbook', :tab => 'versions', :version_status => 'locked' + assert_response :success + + assert_select 'select[name=version_status]' do + assert_select 'option[value=locked][selected=selected]' + end + assert_select 'table.versions tbody' do + assert_select 'tr', 1 + assert_select 'td.name', :text => '1.0' + end + assert_select 'a#tab-versions[href=?]', '/projects/ecookbook/settings/versions?version_status=locked' + end + + def test_settings_should_accept_version_name_filter + @request.session[:user_id] = 2 + + get :settings, :id => 'ecookbook', :tab => 'versions', :version_status => '', :version_name => '.1' + assert_response :success + + assert_select 'input[name=version_name][value=?]', '.1' + assert_select 'table.versions tbody' do + assert_select 'tr', 1 + assert_select 'td.name', :text => '0.1' + end + assert_select 'a#tab-versions[href=?]', '/projects/ecookbook/settings/versions?version_name=.1&version_status=' + end + def test_update @request.session[:user_id] = 2 # manager post :update, :id => 1, :project => {:name => 'Test changed name', |