cartodb-4.42/spec/helpers/storage_helper.rb
2024-04-06 05:25:13 +00: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