aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorRiley <bx+github@teleological.net>2012-10-06 16:14:28 -0400
committerRiley Lynch <oss@teleological.net>2012-10-06 17:23:04 -0400
commit380800e4a272db98f3dd267f82e0ce1e4d03f4b8 (patch)
tree019af1195750d4dc4049c018f313d5402314e27f /actionpack/test
parent92d761237ea9372fefd2c4e514f7f8290eb28d1e (diff)
downloadrails-380800e4a272db98f3dd267f82e0ce1e4d03f4b8.tar.gz
rails-380800e4a272db98f3dd267f82e0ce1e4d03f4b8.tar.bz2
rails-380800e4a272db98f3dd267f82e0ce1e4d03f4b8.zip
Accept :remote as symbol in link_to options
Accept either :remote or 'remote' in both the html_options and (url_)options hash arguments to link_to.
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/url_helper_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb
index d55b1fd2bd..38f77203e0 100644
--- a/actionpack/test/template/url_helper_test.rb
+++ b/actionpack/test/template/url_helper_test.rb
@@ -227,6 +227,13 @@ class UrlHelperTest < ActiveSupport::TestCase
)
end
+ def test_link_to_with_symbolic_remote_in_non_html_options
+ assert_dom_equal(
+ "<a href=\"/\" data-remote=\"true\">Hello</a>",
+ link_to("Hello", hash_for([:remote, true]), {})
+ )
+ end
+
def test_link_tag_using_post_javascript
assert_dom_equal(
"<a href='http://www.example.com' data-method=\"post\" rel=\"nofollow\">Hello</a>",