diff options
author | Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com> | 2010-08-04 21:01:56 +0000 |
---|---|---|
committer | Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com> | 2010-08-04 21:01:56 +0000 |
commit | 0bcde4ab284031851d53bbecf793c4d54c9b6247 (patch) | |
tree | 76e6d739985c33db2781b27243b2cd7b62ff0df7 /test/unit/query_test.rb | |
parent | 8a2bc5772e0ef3aae1150ce55aba5f78af4749ef (diff) | |
download | redmine-0bcde4ab284031851d53bbecf793c4d54c9b6247.tar.gz redmine-0bcde4ab284031851d53bbecf793c4d54c9b6247.zip |
Fixed: assigned_to and author filters in cross project issues view should be based on user's project visibility. #5760
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3916 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/query_test.rb')
-rw-r--r-- | test/unit/query_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index 26cba2a5e..4b11830e8 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -351,4 +351,13 @@ class QueryTest < ActiveSupport::TestCase assert !q.editable_by?(manager) assert !q.editable_by?(developer) end + + context "#available_filters" do + should "include users of visible projects in cross-project view" do + query = Query.new(:name => "_") + users = query.available_filters["assigned_to_id"] + assert_not_nil users + assert users[:values].map{|u|u[1]}.include?("3") + end + end end |