summaryrefslogtreecommitdiffstats
path: root/test/functional/timelog_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-06-07 19:56:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-06-07 19:56:22 +0000
commitc513037c6edce0d039b2f6ab602be8a309e2b68c (patch)
treea173d1dae9fc492f1cd7a411351aa9f65e914e8a /test/functional/timelog_controller_test.rb
parent78147729187f2394ed73ac9dbe0745d4faacec62 (diff)
downloadredmine-c513037c6edce0d039b2f6ab602be8a309e2b68c.tar.gz
redmine-c513037c6edce0d039b2f6ab602be8a309e2b68c.zip
DOn't show time entries when query is invalid (#23912).
git-svn-id: http://svn.redmine.org/redmine/trunk@16635 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/timelog_controller_test.rb')
-rw-r--r--test/functional/timelog_controller_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index 4e6df7e1b..b450f5129 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -989,6 +989,14 @@ class TimelogControllerTest < Redmine::ControllerTest
assert_equal 3, values.size
end
+ def test_index_with_invalid_date_filter_should_not_validate
+ @request.session[:user_id] = 2
+
+ get :index, :params => {:set_filter => '1', :f => ['spent_on'], :op => {'spent_on' => '='}, :v => {'spent_on' => ['2016-09-010']}}
+ assert_select_error 'Date is invalid'
+ assert_select 'table.time-entries', 0
+ end
+
def test_index_with_query
query = TimeEntryQuery.new(:project_id => 1, :name => 'Time Entry Query', :visibility => 2)
query.save!