summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-05 23:11:35 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-05 23:11:35 +0000
commit582dcf4b365e5889a216fcc41dc647046ba9e188 (patch)
tree3fd466f09abaa44da6e459b6daa5a3b2b7ca1428 /test/unit
parent45c93340b78da811d151f16177eeaa59064988f4 (diff)
downloadredmine-582dcf4b365e5889a216fcc41dc647046ba9e188.tar.gz
redmine-582dcf4b365e5889a216fcc41dc647046ba9e188.zip
Fixed that macros with uppercase letters can not be called (#12744).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11126 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/lib/redmine/wiki_formatting/macros_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/wiki_formatting/macros_test.rb b/test/unit/lib/redmine/wiki_formatting/macros_test.rb
index cd3ac7a48..d014aa5e6 100644
--- a/test/unit/lib/redmine/wiki_formatting/macros_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/macros_test.rb
@@ -78,6 +78,12 @@ class Redmine::WikiFormatting::MacrosTest < ActionView::TestCase
assert_equal "<p>Baz: (arg1,arg2) (String) (line1\nline2)</p>", textilizable("{{baz(arg1, arg2)\nline1\nline2\n}}")
end
+ def test_macro_name_with_upper_case
+ Redmine::WikiFormatting::Macros.macro(:UpperCase) {|obj, args| "Upper"}
+
+ assert_equal "<p>Upper</p>", textilizable("{{UpperCase}}")
+ end
+
def test_multiple_macros_on_the_same_line
Redmine::WikiFormatting::Macros.macro :foo do |obj, args|
args.any? ? "args: #{args.join(',')}" : "no args"