Fixed: unchecking status filter on the issue list has no effect (#6844).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4387 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2010-11-07 15:38:51 +00:00
parent 2ca9bb3cca
commit 63866407f1
4 changed files with 40 additions and 7 deletions
+32 -1
View File
@@ -125,11 +125,42 @@ class IssuesControllerTest < ActionController::TestCase
assert_tag :tag => 'a', :content => /Issue of a private subproject/
end
def test_index_with_project_and_filter
def test_index_with_project_and_default_filter
get :index, :project_id => 1, :set_filter => 1
assert_response :success
assert_template 'index.rhtml'
assert_not_nil assigns(:issues)
query = assigns(:query)
assert_not_nil query
# default filter
assert_equal({'status_id' => {:operator => 'o', :values => ['']}}, query.filters)
end
def test_index_with_project_and_filter
get :index, :project_id => 1, :set_filter => 1,
:fields => ['tracker_id'],
:operators => {'tracker_id' => '='},
:values => {'tracker_id' => ['1']}
assert_response :success
assert_template 'index.rhtml'
assert_not_nil assigns(:issues)
query = assigns(:query)
assert_not_nil query
assert_equal({'tracker_id' => {:operator => '=', :values => ['1']}}, query.filters)
end
def test_index_with_project_and_empty_filters
get :index, :project_id => 1, :set_filter => 1, :fields => ['']
assert_response :success
assert_template 'index.rhtml'
assert_not_nil assigns(:issues)
query = assigns(:query)
assert_not_nil query
# no filter
assert_equal({}, query.filters)
end
def test_index_with_query