summaryrefslogtreecommitdiffstats
path: root/test/unit/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-02-09 12:04:44 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-02-09 12:04:44 +0000
commitff46e9d0a437d95550887b9d13a22306163b99f9 (patch)
tree71626290428a1a7e47d1a147b3dbeec2db4d97e0 /test/unit/helpers
parent79d01c7fe57db729cb1a592c7b796ae71503c026 (diff)
downloadredmine-ff46e9d0a437d95550887b9d13a22306163b99f9.tar.gz
redmine-ff46e9d0a437d95550887b9d13a22306163b99f9.zip
Makes #watcher_link return an empty string when given nil.
git-svn-id: http://svn.redmine.org/redmine/trunk@12869 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/helpers')
-rw-r--r--test/unit/helpers/watchers_helper_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/unit/helpers/watchers_helper_test.rb b/test/unit/helpers/watchers_helper_test.rb
index def4ffad8..bf8740cd8 100644
--- a/test/unit/helpers/watchers_helper_test.rb
+++ b/test/unit/helpers/watchers_helper_test.rb
@@ -57,6 +57,10 @@ class WatchersHelperTest < ActionView::TestCase
assert_equal expected, watcher_link([Issue.find(1), Issue.find(3)], User.find(1))
end
+ def test_watcher_link_with_nil_should_return_empty_string
+ assert_equal '', watcher_link(nil, User.find(1))
+ end
+
test '#watcher_link with a watched object' do
Watcher.create!(:watchable => Issue.find(1), :user => User.find(1))