mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Updated tests for TextHelper#auto_link
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@685 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
0369ec79a9
commit
5eac7ad1d9
2 changed files with 8 additions and 3 deletions
|
@ -1,10 +1,14 @@
|
|||
*SVN*
|
||||
|
||||
* Added Iran and Irak to the countries list used by FormOptions#country_select and FormOptions#country_options_for_select
|
||||
|
||||
* Renamed link_to_image to link_image_to (since thats what it actually does) -- kept alias for the old method name
|
||||
|
||||
* Fixed textilize for RedCloth3 to keep doing hardbreaks
|
||||
|
||||
* Fixed that assert_template_xpath_matches did not indicate when a path was not found #658 [Eric Hodel]
|
||||
|
||||
* Added TextHelper#auto_link, TextHelper#auto_link_urls, and TextHelper#auto_link_email_addresses to turn those elements into ahrefs
|
||||
* Added TextHelper#auto_link to turn email addresses and urls into ahrefs
|
||||
|
||||
* Fixed that on validation errors, scaffold couldn't find template #654 [mindel]
|
||||
|
||||
|
|
|
@ -61,8 +61,9 @@ class TextHelperTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_auto_linking
|
||||
assert_equal %(hello <a href="mailto:david@loudthinking.com">david@loudthinking.com</a>), auto_link_email_addresses("hello david@loudthinking.com")
|
||||
assert_equal %(Go to <a href="http://www.rubyonrails.com">http://www.rubyonrails.com</a>), auto_link_urls("Go to http://www.rubyonrails.com")
|
||||
assert_equal %(hello <a href="mailto:david@loudthinking.com">david@loudthinking.com</a>), auto_link("hello david@loudthinking.com", :email_addresses)
|
||||
assert_equal %(Go to <a href="http://www.rubyonrails.com">http://www.rubyonrails.com</a>), auto_link("Go to http://www.rubyonrails.com", :urls)
|
||||
assert_equal %(Go to http://www.rubyonrails.com), auto_link("Go to http://www.rubyonrails.com", :email_addresses)
|
||||
assert_equal %(Go to <a href="http://www.rubyonrails.com">http://www.rubyonrails.com</a> and say hello to <a href="mailto:david@loudthinking.com">david@loudthinking.com</a>), auto_link("Go to http://www.rubyonrails.com and say hello to david@loudthinking.com")
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue