Replicating the issue with capitalized data-method value

This commit is contained in:
Marco Antonio 2011-10-18 10:41:44 -02:00
parent acbb81cb90
commit 594e7b684b
3 changed files with 8 additions and 1 deletions

View File

@ -33,6 +33,7 @@
<a title="twas a fine link" href="/redirect">A link came first</a>
<a title="a fine link" href="/with_simple_html">A link</a>
<a title="a fine link with data method" data-method="delete" href="/delete">A link with data-method</a>
<a title="a fine link with data method capitalized" data-method="DELETE" href="/delete">A link with data-method capitalized</a>
<a>No Href</a>
<a href="">Blank Href</a>
<a href="#">Blank Anchor</a>

View File

@ -32,6 +32,12 @@ describe Capybara::Session do
@session.body.should include('Not deleted')
end
it "should use data-method if available even if it's capitalized" do
@session.visit "/with_html"
@session.click_link "A link with data-method capitalized"
@session.body.should include('The requested object was deleted')
end
after do
@session.driver.options[:respect_data_method] = true
end

2
xpath

@ -1 +1 @@
Subproject commit dbc3356c1daeafd4712c7d7dd9d6a7c91deccab1
Subproject commit d262efb8db3df8916a53693764e9270076690c0d