1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Don't send query params from 'action' in GET forms

This commit is contained in:
Jonas Nicklas 2009-11-18 22:06:06 +01:00
parent 910fa40666
commit 63bc602f2d
3 changed files with 3 additions and 3 deletions

View file

@ -102,7 +102,7 @@ class Capybara::Driver::RackTest
if post?
driver.submit(node['action'].to_s, params(button))
else
driver.visit(node['action'].to_s + '?' + params(button))
driver.visit(node['action'].to_s.split('?').first + '?' + params(button))
end
end

View file

@ -156,9 +156,9 @@ shared_examples_for "session" do
it "should serialize and send GET forms" do
@session.visit('/form')
@session.click_button('med')
#puts @session.body
@results = extract_results(@session)
@results['middle_name'].should == 'Darren'
@results['foo'].should be_nil
end
it "should follow redirects" do

View file

@ -88,7 +88,7 @@
</p>
</form>
<form action="/form/get" method="get">
<form action="/form/get?foo=bar" method="get">
<p>
<label for="form_middle_name">Middle Name</label>
<input type="text" name="form[middle_name]" value="Darren" id="form_middle_name"/>