diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-03 15:29:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-03 15:29:51 +0000 |
commit | 036c3a56b4c53691c28702c001a92e0e36ddc27e (patch) | |
tree | 507cb0a8cad927b5c6d8b3d4739e5eef3414c00e /test | |
parent | 30bc5873e0b8f51209fa16976d6cb4c44041cb67 (diff) | |
download | redmine-036c3a56b4c53691c28702c001a92e0e36ddc27e.tar.gz redmine-036c3a56b4c53691c28702c001a92e0e36ddc27e.zip |
Adds a test for macro registration.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8054 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/lib/redmine/wiki_formatting/macros_test.rb | 11 |
1 files changed, 11 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 704e74528..e6f06489c 100644 --- a/test/unit/lib/redmine/wiki_formatting/macros_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/macros_test.rb @@ -39,6 +39,17 @@ class Redmine::WikiFormatting::MacrosTest < ActionView::TestCase def teardown end + def test_macro_registration + Redmine::WikiFormatting::Macros.register do + macro :foo do + "Foo macro output" + end + end + + text = "{{foo}}" + assert_equal '<p>Foo macro output</p>', textilizable(text) + end + def test_macro_hello_world text = "{{hello_world}}" assert textilizable(text).match(/Hello world!/) |