Fix bug that causes explosions when there is a file field on the page
This commit is contained in:
parent
06c7552f01
commit
275611a0a3
@ -216,6 +216,9 @@ module Webrat
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class FileField < Field
|
||||||
|
end
|
||||||
|
|
||||||
class TextField < Field
|
class TextField < Field
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -77,6 +77,16 @@ class ClicksButtonTest < Test::Unit::TestCase
|
|||||||
@session.clicks_button
|
@session.clicks_button
|
||||||
end
|
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
|
def test_should_submit_the_form_with_the_specified_button
|
||||||
@response.stubs(:body).returns(<<-EOS)
|
@response.stubs(:body).returns(<<-EOS)
|
||||||
<form method="get" action="/form1">
|
<form method="get" action="/form1">
|
||||||
|
Loading…
Reference in New Issue
Block a user