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:
parent
910fa40666
commit
63bc602f2d
3 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"/>
|
||||
|
|
Loading…
Reference in a new issue