cartodb-4.42/spec/helpers/storage_helper.rb

10 lines
399 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +08:00
module StorageHelper
def bypass_storage(identifier: 'es/co/bar.png', url: "https://manolo.es/#{identifier}")
Carto::Storage.instance.stubs(:s3_enabled?).returns(false)
Carto::StorageOptions::Local.any_instance
.stubs(:upload)
.returns([identifier, url])
Carto::StorageOptions::Local.any_instance.stubs(:remove)
end
end