1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/storage/models/files_tests.rb

26 lines
612 B
Ruby

for provider, config in storage_providers
Shindo.tests("Storage[:#{provider}] | files", [provider.to_s]) do
if !Fog.mocking? || config[:mocked]
file_attributes = {
:key => 'fog_files_tests',
:body => lorem_file
}.merge!(config[:file_attributes] || {})
directory_attributes = {
:key => 'fogfilestests'
}.merge!(config[:directory_attributes] || {})
@directory = Fog::Storage[provider].directories.create(directory_attributes)
collection_tests(@directory.files, file_attributes, config[:mocked])
@directory.destroy
end
end
end