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/ninefold/nested_directories_tests.rb

30 lines
938 B
Ruby
Raw Normal View History

2011-07-09 02:55:55 -04:00
if storage_providers.keys.include? :ninefold
for provider, config in storage_providers
Shindo.tests("Storage[:ninefold] | nested directories", [provider]) do
ninefold = Fog::Storage[:ninefold]
tests("create a directory with a / character").succeeds do
pending if Fog.mocking?
2011-07-09 02:55:55 -04:00
ninefold.directories.create(:key => 'sub/path')
end
tests("List of top directory returns sub dir").returns(1) do
pending if Fog.mocking?
2011-07-09 02:55:55 -04:00
ninefold.directories.get('sub').directories.count
end
2011-07-10 09:44:35 -04:00
tests("create a directory in a sub dir").returns('sub/path/newdir/') do
pending if Fog.mocking?
2011-07-09 02:55:55 -04:00
ninefold.directories.get('sub/path').directories.create(:key => 'newdir').identity
end
tests("Recursively destroy parent dir").succeeds do
pending if Fog.mocking?
2011-07-09 02:55:55 -04:00
ninefold.directories.get('sub').destroy(:recursive => true)
end
end
end
end