@@ -538,7 +538,7 private | |||||
538 | session[:query] = {:id => @query.id, :project_id => @query.project_id} |
|
538 | session[:query] = {:id => @query.id, :project_id => @query.project_id} | |
539 | sort_clear |
|
539 | sort_clear | |
540 | else |
|
540 | else | |
541 | if params[:set_filter] || session[:query].nil? || session[:query][:project_id] != (@project ? @project.id : nil) |
|
541 | if api_request? || params[:set_filter] || session[:query].nil? || session[:query][:project_id] != (@project ? @project.id : nil) | |
542 | # Give it a name, required to be valid |
|
542 | # Give it a name, required to be valid | |
543 | @query = Query.new(:name => "_") |
|
543 | @query = Query.new(:name => "_") | |
544 | @query.project = @project |
|
544 | @query.project = @project |
@@ -58,6 +58,15 class IssuesApiTest < ActionController::IntegrationTest | |||||
58 | assert_response :success |
|
58 | assert_response :success | |
59 | assert_equal 'application/xml', @response.content_type |
|
59 | assert_equal 'application/xml', @response.content_type | |
60 | end |
|
60 | end | |
|
61 | ||||
|
62 | def test_index_with_filter | |||
|
63 | get '/issues.xml?status_id=5' | |||
|
64 | assert_response :success | |||
|
65 | assert_equal 'application/xml', @response.content_type | |||
|
66 | assert_tag :tag => 'issues', | |||
|
67 | :children => { :count => Issue.visible.count(:conditions => {:status_id => 5}), | |||
|
68 | :only => { :tag => 'issue' } } | |||
|
69 | end | |||
61 |
|
70 | |||
62 | def test_show_routing |
|
71 | def test_show_routing | |
63 | assert_routing( |
|
72 | assert_routing( |
General Comments 0
You need to be logged in to leave comments.
Login now