Fix form fields being double-escaped with :rack
Signed-off-by: Simon Rozet <simon@rozet.name>
This commit is contained in:
parent
cf8d891302
commit
cbc447223c
|
@ -87,10 +87,8 @@ module Webrat
|
|||
parse_rails_request_params("#{name}=#{escaped_value}")
|
||||
when :merb
|
||||
::Merb::Parse.query("#{name}=#{escaped_value}")
|
||||
when :mechanize
|
||||
{ name => value }
|
||||
else
|
||||
{ name => escaped_value }
|
||||
{ name => value }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -8,15 +8,15 @@ class WebratRackTest < Test::Unit::TestCase
|
|||
assert_have_tag("form[@method='post'][@action='/go']")
|
||||
end
|
||||
|
||||
# def test_submits_form
|
||||
# visit "/go"
|
||||
# fill_in "Name", :with => "World"
|
||||
# fill_in "Email", :with => "world@example.org"
|
||||
# click_button "Submit"
|
||||
#
|
||||
# assert_contain "Hello, World"
|
||||
# assert_contain "Your email is: world@example.org"
|
||||
# end
|
||||
def test_submits_form
|
||||
visit "/go"
|
||||
fill_in "Name", :with => "World"
|
||||
fill_in "Email", :with => "world@example.org"
|
||||
click_button "Submit"
|
||||
|
||||
assert_contain "Hello, World"
|
||||
assert_contain "Your email is: world@example.org"
|
||||
end
|
||||
|
||||
def test_check_value_of_field
|
||||
visit "/"
|
||||
|
|
Loading…
Reference in New Issue