Adds a test for macro registration.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8054 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-12-03 15:29:51 +00:00
parent 30bc5873e0
commit 036c3a56b4
1 changed files with 11 additions and 0 deletions

View File

@ -39,6 +39,17 @@ class Redmine::WikiFormatting::MacrosTest < ActionView::TestCase
def teardown def teardown
end 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 def test_macro_hello_world
text = "{{hello_world}}" text = "{{hello_world}}"
assert textilizable(text).match(/Hello world!/) assert textilizable(text).match(/Hello world!/)