summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-18 19:42:18 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-18 19:42:18 +0000
commitf79961f1c53384f75e244fc4b718e33964fce365 (patch)
tree77865997c30655e47f5c4e549de23138dde812dc /test/functional
parent327a74b4066a3cf7272435750baa1a277a502004 (diff)
downloadredmine-f79961f1c53384f75e244fc4b718e33964fce365.tar.gz
redmine-f79961f1c53384f75e244fc4b718e33964fce365.zip
Additional tests for TimelogController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9440 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/timelog_controller_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index d23426c52..9fa9ae637 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -450,6 +450,18 @@ class TimelogControllerTest < ActionController::TestCase
:attributes => {:action => "/projects/ecookbook/time_entries", :id => 'query_form'}
end
+ def test_index_from_a_date
+ get :index, :project_id => 'ecookbook', :from => "2007-03-23", :to => ""
+ assert_equal '2007-03-23'.to_date, assigns(:from)
+ assert_nil assigns(:to)
+ end
+
+ def test_index_to_a_date
+ get :index, :project_id => 'ecookbook', :from => "", :to => "2007-03-23"
+ assert_nil assigns(:from)
+ assert_equal '2007-03-23'.to_date, assigns(:to)
+ end
+
def test_index_today
Date.stubs(:today).returns('2011-12-15'.to_date)
get :index, :period => 'today'