summaryrefslogtreecommitdiffstats
path: root/test/functional/timelog_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-07-09 17:16:01 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-07-09 17:16:01 +0000
commit9748fc46689fd6dd1dad9ec05678200a3505d026 (patch)
tree7cafbb96c5e7d46288022b930e10b4a24d4fd5df /test/functional/timelog_controller_test.rb
parentd16341966a74ac14946a27a8ba94ed9fa9832516 (diff)
downloadredmine-9748fc46689fd6dd1dad9ec05678200a3505d026.tar.gz
redmine-9748fc46689fd6dd1dad9ec05678200a3505d026.zip
Error displaying time entries filtered by Activity (#26387).
git-svn-id: http://svn.redmine.org/redmine/trunk@16808 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/timelog_controller_test.rb')
-rw-r--r--test/functional/timelog_controller_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index 1f8ad936d..89b1ccfcf 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -847,6 +847,20 @@ class TimelogControllerTest < Redmine::ControllerTest
assert_equal [t3, t1, t2].map(&:id).map(&:to_s), css_select('input[name="ids[]"]').map {|e| e.attr('value')}
end
+ def test_index_with_activity_filter
+ activity = TimeEntryActivity.create!(:name => 'Activity')
+ entry = TimeEntry.generate!(:issue_id => 1, :hours => 4.5, :activity => activity)
+
+ get :index, :params => {
+ :f => ['activity_id'],
+ :op => {'activity_id' => '='},
+ :v => {'activity_id' => [activity.id.to_s]}
+ }
+ assert_response :success
+ assert_select "tr#time-entry-#{entry.id}"
+ assert_select "table.time-entries tbody tr", 1
+ end
+
def test_index_with_issue_status_filter
Issue.where(:status_id => 4).update_all(:status_id => 2)
issue = Issue.generate!(:project_id => 1, :tracker_id => 1, :status_id => 4)