Add "last 2 weeks" preset to time entries reporting (#11862).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10583 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-10-09 17:40:00 +00:00
parent 340b4a30d0
commit 3a178a42cf
5 changed files with 13 additions and 0 deletions

View File

@@ -523,6 +523,13 @@ class TimelogControllerTest < ActionController::TestCase
assert_equal '2011-12-11'.to_date, assigns(:to)
end
def test_index_last_2_week
Date.stubs(:today).returns('2011-12-15'.to_date)
get :index, :period => 'last_2_weeks'
assert_equal '2011-11-28'.to_date, assigns(:from)
assert_equal '2011-12-11'.to_date, assigns(:to)
end
def test_index_7_days
Date.stubs(:today).returns('2011-12-15'.to_date)
get :index, :period => '7_days'