aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJosh <jdeseno@gmail.com>2011-06-21 07:49:10 -0700
committerJosh <jdeseno@gmail.com>2011-06-21 07:49:10 -0700
commit9c1d0d88a7bab0b0bc0d39748458bbeb327b7725 (patch)
treef54283b713a03e23967cf96c242bc3788e6308d5 /actionpack/test
parent40e6f437e8197f9fa5ad6c9ce87c9ec062b889bf (diff)
downloadrails-9c1d0d88a7bab0b0bc0d39748458bbeb327b7725.tar.gz
rails-9c1d0d88a7bab0b0bc0d39748458bbeb327b7725.tar.bz2
rails-9c1d0d88a7bab0b0bc0d39748458bbeb327b7725.zip
Adds a test to check link_to with method & rel options
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 1e54f0174c..a70c02a429 100644
--- a/actionpack/test/template/url_helper_test.rb
+++ b/actionpack/test/template/url_helper_test.rb
@@ -245,6 +245,13 @@ class UrlHelperTest < ActiveSupport::TestCase
)
end
+ def test_link_tag_using_post_javascript_and_rel
+ assert_dom_equal(
+ "<a href='http://www.example.com' data-method=\"post\" rel=\"example nofollow\">Hello</a>",
+ link_to("Hello", "http://www.example.com", :method => :post, :rel => 'example')
+ )
+ end
+
def test_link_tag_using_post_javascript_and_confirm
assert_dom_equal(
"<a href=\"http://www.example.com\" data-method=\"post\" rel=\"nofollow\" data-confirm=\"Are you serious?\">Hello</a>",