aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/url_helper_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-06 16:44:30 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-06 16:44:30 -0700
commit410d376d3c78e6b7740d73bb04dc4a59629518c9 (patch)
treeb5e6c3c1622cd33b56ffe0fb9c5d26f390441148 /actionpack/test/template/url_helper_test.rb
parent86b13b6f54fe0f98ef5452ba149ca9956e4a778a (diff)
parent6caae0231c11ad89c1eeed3b0f8db8dfcb88c729 (diff)
downloadrails-410d376d3c78e6b7740d73bb04dc4a59629518c9.tar.gz
rails-410d376d3c78e6b7740d73bb04dc4a59629518c9.tar.bz2
rails-410d376d3c78e6b7740d73bb04dc4a59629518c9.zip
Merge pull request #7864 from teleological/link_to_remote_master
Accept :remote as symbol in link_to options
Diffstat (limited to 'actionpack/test/template/url_helper_test.rb')
-rw-r--r--actionpack/test/template/url_helper_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb
index 134177d74d..a969634e22 100644
--- a/actionpack/test/template/url_helper_test.rb
+++ b/actionpack/test/template/url_helper_test.rb
@@ -298,6 +298,20 @@ 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_to_with_string_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>",