mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 19:36:00 +01:00
Wrong filters are applied when exporting issues to CSV with blank filter (#23206).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@15608 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -488,6 +488,9 @@ class IssuesControllerTest < ActionController::TestCase
|
||||
|
||||
assert_select 'input[name=?][value=?]', 'sort', 'status'
|
||||
end
|
||||
|
||||
get :index, :project_id => 1, :set_filter => "1", :f => []
|
||||
assert_select '#csv-export-form input[name=?][value=?]', 'f[]', ''
|
||||
end
|
||||
|
||||
def test_index_csv
|
||||
@@ -507,6 +510,14 @@ class IssuesControllerTest < ActionController::TestCase
|
||||
assert_equal 'text/csv; header=present', @response.content_type
|
||||
end
|
||||
|
||||
def test_index_csv_without_any_filters
|
||||
@request.session[:user_id] = 1
|
||||
Issue.create!(:project_id => 1, :tracker_id => 1, :status_id => 5, :subject => 'Closed issue', :author_id => 1)
|
||||
get :index, :set_filter => 1, :f => [], :format => 'csv'
|
||||
assert_response :success
|
||||
assert_equal Issue.count, assigns(:issues).count
|
||||
end
|
||||
|
||||
def test_index_csv_with_description
|
||||
Issue.generate!(:description => 'test_index_csv_with_description')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user