Commit 55b86dcc authored by jplang's avatar jplang

Tests broken by r15942 (#8761).

git-svn-id: https://svn.redmine.org/redmine/trunk@15943 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 18f0e9e9
......@@ -108,7 +108,7 @@ module MyHelper
to_a
end
def timelog_items(settings)
def timelog_items(settings={})
days = settings[:days].to_i
days = 7 if days < 1 || days > 365
......
......@@ -37,7 +37,7 @@ class MyHelperTest < Redmine::HelperTest
entry = TimeEntry.generate!(:spent_on => Date.today, :user_id => 2, :project_id => 1)
assert_nil entry.issue
assert_include entry, timelog_items
assert_include entry, timelog_items.first
end
def test_timelog_items_should_include_time_entries_with_issue
......@@ -45,6 +45,6 @@ class MyHelperTest < Redmine::HelperTest
entry = TimeEntry.generate!(:spent_on => Date.today, :user_id => 2, :project_id => 1, :issue_id => 1)
assert_not_nil entry.issue
assert_include entry, timelog_items
assert_include entry, timelog_items.first
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment