@@ -257,6 +257,8 module QueriesHelper | |||||
257 | tags << hidden_field_tag("v[#{field}][]", value, :id => nil) |
|
257 | tags << hidden_field_tag("v[#{field}][]", value, :id => nil) | |
258 | end |
|
258 | end | |
259 | end |
|
259 | end | |
|
260 | else | |||
|
261 | tags << hidden_field_tag("f[]", "", :id => nil) | |||
260 | end |
|
262 | end | |
261 | if query.column_names.present? |
|
263 | if query.column_names.present? | |
262 | query.column_names.each do |name| |
|
264 | query.column_names.each do |name| |
@@ -488,6 +488,9 class IssuesControllerTest < ActionController::TestCase | |||||
488 |
|
488 | |||
489 | assert_select 'input[name=?][value=?]', 'sort', 'status' |
|
489 | assert_select 'input[name=?][value=?]', 'sort', 'status' | |
490 | end |
|
490 | end | |
|
491 | ||||
|
492 | get :index, :project_id => 1, :set_filter => "1", :f => [] | |||
|
493 | assert_select '#csv-export-form input[name=?][value=?]', 'f[]', '' | |||
491 | end |
|
494 | end | |
492 |
|
495 | |||
493 | def test_index_csv |
|
496 | def test_index_csv | |
@@ -507,6 +510,14 class IssuesControllerTest < ActionController::TestCase | |||||
507 | assert_equal 'text/csv; header=present', @response.content_type |
|
510 | assert_equal 'text/csv; header=present', @response.content_type | |
508 | end |
|
511 | end | |
509 |
|
512 | |||
|
513 | def test_index_csv_without_any_filters | |||
|
514 | @request.session[:user_id] = 1 | |||
|
515 | Issue.create!(:project_id => 1, :tracker_id => 1, :status_id => 5, :subject => 'Closed issue', :author_id => 1) | |||
|
516 | get :index, :set_filter => 1, :f => [], :format => 'csv' | |||
|
517 | assert_response :success | |||
|
518 | assert_equal Issue.count, assigns(:issues).count | |||
|
519 | end | |||
|
520 | ||||
510 | def test_index_csv_with_description |
|
521 | def test_index_csv_with_description | |
511 | Issue.generate!(:description => 'test_index_csv_with_description') |
|
522 | Issue.generate!(:description => 'test_index_csv_with_description') | |
512 |
|
523 |
General Comments 0
You need to be logged in to leave comments.
Login now