mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Slight improvement to failed upload spec
This commit is contained in:
parent
a996d5eba6
commit
0509c87aa5
2 changed files with 2 additions and 1 deletions
|
@ -538,6 +538,7 @@ shared_examples_for "session" do
|
|||
|
||||
it "should not break if no file is submitted" do
|
||||
@session.click_button('Upload')
|
||||
@session.body.should include('No file uploaded')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class TestApp < Sinatra::Base
|
|||
end
|
||||
|
||||
post '/upload' do
|
||||
params[:form][:document][:tempfile].read rescue ''
|
||||
params[:form][:document][:tempfile].read rescue 'No file uploaded'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue