2010-11-03 21:17:20 -04:00
|
|
|
def directory_tests(connection, mocks_implemented = true)
|
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
|
|
|
if !Fog.mocking? || mocks_implemented
|
|
|
|
@directory = connection.directories.new(:key => 'fogdirectorytests')
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("#save").succeeds do
|
|
|
|
pending if Fog.mocking? && !mocks_implemented
|
|
|
|
@directory.save
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("#destroy").succeeds do
|
|
|
|
pending if Fog.mocking? && !mocks_implemented
|
|
|
|
@directory.destroy
|
|
|
|
end
|
|
|
|
|
2010-11-05 14:37:12 -04:00
|
|
|
tests("#public=(true)").succeeds do
|
|
|
|
@directory.public=(true)
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("#respond_to?(:public_url)").succeeds do
|
|
|
|
@directory.respond_to?(:public_url)
|
|
|
|
end
|
|
|
|
|
2010-11-03 21:17:20 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|