summaryrefslogtreecommitdiffstats
path: root/test/functional/timelog_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-12 12:38:45 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-12 12:38:45 +0000
commit14b09361e4a94e8cb28c6572e98231e282e350c8 (patch)
tree6a92828fac5ed8c9ec07c203cb3d74d78f452cbf /test/functional/timelog_controller_test.rb
parentcd9923e39165dbd4003ce893ce846bb857f91f35 (diff)
downloadredmine-14b09361e4a94e8cb28c6572e98231e282e350c8.tar.gz
redmine-14b09361e4a94e8cb28c6572e98231e282e350c8.zip
Adds issue custom fields to time entries filters (#10191).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11171 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/timelog_controller_test.rb')
-rw-r--r--test/functional/timelog_controller_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index 5038a09d6..cb81a41ad 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -519,6 +519,15 @@ class TimelogControllerTest < ActionController::TestCase
assert_equal [t3, t1, t2], assigns(:entries)
end
+ def test_index_with_filter_on_issue_custom_field
+ issue = Issue.generate!(:project_id => 1, :tracker_id => 1, :custom_field_values => {2 => 'filter_on_issue_custom_field'})
+ entry = TimeEntry.generate!(:issue => issue, :hours => 2.5)
+
+ get :index, :f => ['issue.cf_2'], :op => {'issue.cf_2' => '='}, :v => {'issue.cf_2' => ['filter_on_issue_custom_field']}
+ assert_response :success
+ assert_equal [entry], assigns(:entries)
+ end
+
def test_index_atom_feed
get :index, :project_id => 1, :format => 'atom'
assert_response :success