|
|
@@ -229,6 +229,14 @@ class TimelogControllerTest < ActionController::TestCase |
|
|
|
assert_equal "162.90", "%.2f" % assigns(:total_hours) |
|
|
|
end |
|
|
|
|
|
|
|
def test_report_one_day |
|
|
|
get :report, :project_id => 1, :columns => 'day', :from => "2007-03-23", :to => "2007-03-23", :criterias => ["member", "activity"] |
|
|
|
assert_response :success |
|
|
|
assert_template 'report' |
|
|
|
assert_not_nil assigns(:total_hours) |
|
|
|
assert_equal "4.25", "%.2f" % assigns(:total_hours) |
|
|
|
end |
|
|
|
|
|
|
|
def test_report_at_issue_level |
|
|
|
get :report, :project_id => 1, :issue_id => 1, :columns => 'month', :from => "2007-01-01", :to => "2007-12-31", :criterias => ["member", "activity"] |
|
|
|
assert_response :success |
|
|
@@ -337,6 +345,14 @@ class TimelogControllerTest < ActionController::TestCase |
|
|
|
assert_equal Date.today - 7, assigns(:from) |
|
|
|
assert_equal Date.today, assigns(:to) |
|
|
|
end |
|
|
|
|
|
|
|
def test_details_one_day |
|
|
|
get :details, :project_id => 1, :from => "2007-03-23", :to => "2007-03-23" |
|
|
|
assert_response :success |
|
|
|
assert_template 'details' |
|
|
|
assert_not_nil assigns(:total_hours) |
|
|
|
assert_equal "4.25", "%.2f" % assigns(:total_hours) |
|
|
|
end |
|
|
|
|
|
|
|
def test_issue_details_routing |
|
|
|
assert_routing( |