require 'test_helper'
# Test some event helper methods
class EventsHelperTest < ActionView::TestCase
test 'Markdown with empty content' do
assert_equal '', to_markdown('')
assert_equal '', to_markdown(' ')
assert_equal "'", to_markdown("\'")
assert_equal '', to_markdown('
')
end
test 'HTML elements with a space inside' do
assert_equal '**hello world**', to_markdown('hello world ')
assert_equal '**h**,', to_markdown(' h,')
assert_equal '**h**,', to_markdown('h ,')
assert_equal '*ho***h**,', to_markdown('hoh ,')
assert_equal '*ho* **h**,', to_markdown('ho h,')
end
end