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

44 lines
No EOL
919 B
Ruby

Shindo.tests("Fog::Storage[:hp] | directory", ['hp', 'storage']) do
file_attributes = {
:key => 'fog_file_tests',
:body => lorem_file,
:public => true
}
directory_attributes = {
:key => 'fogfilestests'
}
@directory = Fog::Storage[:hp].directories.create(directory_attributes)
model_tests(@directory.files, file_attributes, true) do
@file = @directory.files.get('fog_file_tests')
tests('success') do
tests("#directory").returns(@directory.key) do
@file.directory.key
end
tests("#cdn_public_url").succeeds do
pending if Fog.mocking?
@file.cdn_public_url
end
tests("#cdn_public_ssl_url").succeeds do
pending if Fog.mocking?
@file.cdn_public_ssl_url
end
tests("#temp_signed_url(60, 'GET')").succeeds do
@file.temp_signed_url(60, 'GET')
end
end
end
@directory.destroy
end