diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-03-12 09:54:40 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-03-12 09:54:40 +0000 |
commit | aeea7f7e23d806c6439d91949ca9e1c147920548 (patch) | |
tree | 0c84178cd096abb0ae4ad8c2f75249d0ce821d89 /test | |
parent | b121335eff9cf73dd127925b1945bef6cc4c5e8f (diff) | |
download | redmine-aeea7f7e23d806c6439d91949ca9e1c147920548.tar.gz redmine-aeea7f7e23d806c6439d91949ca9e1c147920548.zip |
Adds query params as hidden field tags to the CSV export form (#22108).
git-svn-id: http://svn.redmine.org/redmine/trunk@15202 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/issues_controller_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 0ad26973e..e325e7f36 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -428,6 +428,26 @@ class IssuesControllerTest < ActionController::TestCase end end + def test_index_should_include_query_params_as_hidden_fields_in_csv_export_form + get :index, :project_id => 1, :set_filter => "1", :tracker_id => "2", :sort => 'status', :c => ["status", "priority"] + + assert_select '#csv-export-form[action=?]', '/projects/ecookbook/issues.csv' + assert_select '#csv-export-form[method=?]', 'get' + + assert_select '#csv-export-form' do + assert_select 'input[name=?][value=?]', 'set_filter', '1' + + assert_select 'input[name=?][value=?]', 'f[]', 'tracker_id' + assert_select 'input[name=?][value=?]', 'op[tracker_id]', '=' + assert_select 'input[name=?][value=?]', 'v[tracker_id][]', '2' + + assert_select 'input[name=?][value=?]', 'c[]', 'status' + assert_select 'input[name=?][value=?]', 'c[]', 'priority' + + assert_select 'input[name=?][value=?]', 'sort', 'status' + end + end + def test_index_csv get :index, :format => 'csv' assert_response :success |