summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-07 15:38:51 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-07 15:38:51 +0000
commit63866407f123f0f991c164d5e715e3fbbcdf53df (patch)
tree644c74c84a0174453e0aa5a71459f163b05289e4 /test
parent2ca9bb3cca0b43e4a3ee8da12d87baf957acbeab (diff)
downloadredmine-63866407f123f0f991c164d5e715e3fbbcdf53df.tar.gz
redmine-63866407f123f0f991c164d5e715e3fbbcdf53df.zip
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
Diffstat (limited to 'test')
-rw-r--r--test/functional/issues_controller_test.rb33
1 files changed, 32 insertions, 1 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 1fdff9214..e81556d5f 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -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