##// END OF EJS Templates
Additional tests for TimelogController....
Jean-Philippe Lang -
r9306:f79961f1c533
parent child
Show More
@@ -450,6 +450,18 class TimelogControllerTest < ActionController::TestCase
450 :attributes => {:action => "/projects/ecookbook/time_entries", :id => 'query_form'}
450 :attributes => {:action => "/projects/ecookbook/time_entries", :id => 'query_form'}
451 end
451 end
452
452
453 def test_index_from_a_date
454 get :index, :project_id => 'ecookbook', :from => "2007-03-23", :to => ""
455 assert_equal '2007-03-23'.to_date, assigns(:from)
456 assert_nil assigns(:to)
457 end
458
459 def test_index_to_a_date
460 get :index, :project_id => 'ecookbook', :from => "", :to => "2007-03-23"
461 assert_nil assigns(:from)
462 assert_equal '2007-03-23'.to_date, assigns(:to)
463 end
464
453 def test_index_today
465 def test_index_today
454 Date.stubs(:today).returns('2011-12-15'.to_date)
466 Date.stubs(:today).returns('2011-12-15'.to_date)
455 get :index, :period => 'today'
467 get :index, :period => 'today'
General Comments 0
You need to be logged in to leave comments. Login now