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

24 lines
537 B
Ruby
Raw Normal View History

2011-12-02 13:27:44 -05:00
Shindo.tests('Fog::Compute[:ibm] | key', ['ibm']) do
tests('success') do
2012-02-13 10:51:03 -05:00
@key_name = 'fog-test-key-' + Time.now.to_i.to_s(32)
2011-12-02 13:27:44 -05:00
@key = nil
2012-02-13 10:51:03 -05:00
tests("Fog::Compute::IBM::Key.create(:name => '#{@key_name}')") do
@key = Fog::Compute[:ibm].keys.create(:name => @key_name)
returns(@key_name) { @key.name }
2011-12-02 13:27:44 -05:00
end
2012-02-13 10:51:03 -05:00
2011-12-02 13:27:44 -05:00
tests("Fog::Compute::IBM::Key#instances") do
returns([]) { @key.instances }
end
2012-02-13 10:51:03 -05:00
2011-12-02 13:27:44 -05:00
tests('Fog::Compute::IBM::Key#destroy') do
returns(true) { @key.destroy }
end
2012-02-13 10:51:03 -05:00
2011-12-02 13:27:44 -05:00
end
2012-02-13 10:51:03 -05:00
end