Skip to content

Commit ea72c35

Browse files
committed
fix: update complex tests for appengine/storage
1 parent b0cb351 commit ea72c35

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

appengine/storage/spec/storage_spec.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919

2020
describe "Cloud Storage", type: :feature do
2121
before do
22-
Capybara.current_driver = :cuprite
22+
Capybara.register_driver :cuprite do |app|
23+
Capybara::Cuprite::Driver.new(app, browser_options: {'no-sandbox': nil})
24+
end
2325
end
2426
it "can upload and get public URL of uploaded file" do
2527
Capybara.app = Sinatra::Application
@@ -31,7 +33,7 @@
3133

3234
uploaded_file_public_url = page.find("body").text
3335

34-
visit uploaded_file_public_url
35-
expect(page).to have_content "This is the content of the test-upload.txt file"
36+
page = Net::HTTP.get_response(URI(uploaded_file_public_url))
37+
expect(page.body).to include "This is the content of the test-upload.txt file"
3638
end
3739
end

0 commit comments

Comments
 (0)