diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/helpers/application_helper_test.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 91323d3a5..d0eb30b93 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -88,6 +88,7 @@ class ApplicationHelperTest < ActionView::TestCase # invalid urls 'http://' => 'http://', 'www.' => 'www.', + 'test-www.bar.com' => 'test-www.bar.com', } to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } end @@ -104,8 +105,11 @@ class ApplicationHelperTest < ActionView::TestCase end def test_auto_mailto - assert_equal '<p><a class="email" href="mailto:test@foo.bar">test@foo.bar</a></p>', - textilizable('test@foo.bar') + to_test = { + 'test@foo.bar' => '<a class="email" href="mailto:test@foo.bar">test@foo.bar</a>', + 'test@www.foo.bar' => '<a class="email" href="mailto:test@www.foo.bar">test@www.foo.bar</a>', + } + to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } end def test_inline_images |