cartodb/spec/helpers/storage_helper.rb
2020-06-15 10:58:47 +08:00

10 lines
399 B
Ruby

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