mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
24 lines
No EOL
481 B
Ruby
24 lines
No EOL
481 B
Ruby
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
|
|
|
|
end
|
|
|
|
tests('failure') do
|
|
end
|
|
|
|
end |