mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Merge remote branch 'darrinholst/master'
This commit is contained in:
commit
5325d6a9c4
3 changed files with 22 additions and 15 deletions
|
@ -141,7 +141,7 @@ class Capybara::Driver::RackTest < Capybara::Driver::Base
|
|||
end
|
||||
end
|
||||
end
|
||||
merge_param!(params, button[:name], button[:value]) if button[:name]
|
||||
merge_param!(params, button[:name], button[:value] || "") if button[:name]
|
||||
params
|
||||
end
|
||||
|
||||
|
|
|
@ -202,6 +202,12 @@ shared_examples_for "click_button" do
|
|||
end
|
||||
end
|
||||
|
||||
it "should serialize and send valueless buttons that were clicked" do
|
||||
@session.click_button('No Value!')
|
||||
@results = extract_results(@session)
|
||||
@results['no_value'].should_not be_nil
|
||||
end
|
||||
|
||||
it "should serialize and send GET forms" do
|
||||
@session.visit('/form')
|
||||
@session.click_button('med')
|
||||
|
|
|
@ -153,6 +153,7 @@
|
|||
<input type="submit" name="form[crappy]" id="crap321" value="crappy"/>
|
||||
<input type="image" name="form[okay]" id="okay556" value="okay" alt="oh hai thar"/>
|
||||
<button type="submit" id="click_me_123" value="click_me">Click me!</button>
|
||||
<button type="submit" name="form[no_value]">No Value!</button>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
|
|
Loading…
Reference in a new issue