Additional tests for TimelogController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9440 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
327a74b406
commit
f79961f1c5
@ -450,6 +450,18 @@ class TimelogControllerTest < ActionController::TestCase
|
|||||||
:attributes => {:action => "/projects/ecookbook/time_entries", :id => 'query_form'}
|
:attributes => {:action => "/projects/ecookbook/time_entries", :id => 'query_form'}
|
||||||
end
|
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
|
def test_index_today
|
||||||
Date.stubs(:today).returns('2011-12-15'.to_date)
|
Date.stubs(:today).returns('2011-12-15'.to_date)
|
||||||
get :index, :period => 'today'
|
get :index, :period => 'today'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user