Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adds a test to check link_to with method & rel options

  • Loading branch information...
commit 9c1d0d88a7bab0b0bc0d39748458bbeb327b7725 1 parent 40e6f43
@jdeseno jdeseno authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 actionpack/test/template/url_helper_test.rb
View
7 actionpack/test/template/url_helper_test.rb
@@ -245,6 +245,13 @@ def test_link_tag_using_delete_javascript_and_href
)
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>",
Please sign in to comment.
Something went wrong with that request. Please try again.