Fix bug that causes explosions when there is a file field on the page

This commit is contained in:
Bryan Helmkamp 2008-04-13 18:03:56 -04:00
parent 06c7552f01
commit 275611a0a3
2 changed files with 13 additions and 0 deletions

View File

@ -216,6 +216,9 @@ module Webrat
end
class FileField < Field
end
class TextField < Field
end

View File

@ -77,6 +77,16 @@ class ClicksButtonTest < Test::Unit::TestCase
@session.clicks_button
end
def test_should_not_explode_on_file_fields
@response.stubs(:body).returns(<<-EOS)
<form method="get" action="/form1">
<input type="file" />
<input type="submit" />
</form>
EOS
@session.clicks_button
end
def test_should_submit_the_form_with_the_specified_button
@response.stubs(:body).returns(<<-EOS)
<form method="get" action="/form1">