summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-11-03 17:49:14 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-11-03 17:49:14 +0000
commit3ba70a76164b6758d8d47c8b353644601e0c1db7 (patch)
tree0074435e4ce1e9b92f0e4be82bf8f5a5d02ee7c8
parentdb5bd2b2de4733b3c900468edf4eb35896e4f723 (diff)
downloadredmine-3ba70a76164b6758d8d47c8b353644601e0c1db7.tar.gz
redmine-3ba70a76164b6758d8d47c8b353644601e0c1db7.zip
Tests broken by r15942 (#8761).
git-svn-id: http://svn.redmine.org/redmine/trunk@15943 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/my_helper.rb2
-rw-r--r--test/unit/helpers/my_helper_test.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/my_helper.rb b/app/helpers/my_helper.rb
index 20abc5f3c..0a9324515 100644
--- a/app/helpers/my_helper.rb
+++ b/app/helpers/my_helper.rb
@@ -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
diff --git a/test/unit/helpers/my_helper_test.rb b/test/unit/helpers/my_helper_test.rb
index dc03c5662..0448741d7 100644
--- a/test/unit/helpers/my_helper_test.rb
+++ b/test/unit/helpers/my_helper_test.rb
@@ -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