Sha256: 5c12c90b990717ff8a8708378a5d58b234ea0b428e6ef5d942c0b64d97208b84

Contents?: true

Size: 910 Bytes

Versions: 73

Compression:

Stored size: 910 Bytes

Contents

Shindo.tests('Fog::Compute[:digitalocean] | ssh_keys collection', ['digitalocean']) do

  service =  Fog::Compute[:digitalocean]

  tests('The ssh_keys collection') do
    key = service.ssh_keys.create :name => 'fookey',
                                  :ssh_pub_key => 'fookey'
    [:all, :get].each do |method|
      test("should respond to #{method}") do
        service.ssh_keys.respond_to? method
      end
    end

    tests('should have Fog::Compute::DigitalOcean::SshKey inside') do
      service.ssh_keys.each do |s|
        test { s.kind_of? Fog::Compute::DigitalOcean::SshKey }
      end
    end

    tests('should be able to get a model') do
      test('by instance id') do
        retrieved_key = service.ssh_keys.get(key.id)
        test { retrieved_key.kind_of? Fog::Compute::DigitalOcean::SshKey }
        test { retrieved_key.name == key.name }
      end
    end

    key.destroy

  end

end

Version data entries

73 entries across 73 versions & 6 rubygems

Version Path
fog-1.37.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
fog-1.36.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
fog-1.35.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
fog-2.0.0.pre.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/digitalocean/models/compute/ssh_keys_tests.rb
fog-1.34.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
fog-1.33.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
fog-1.32.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
fog-1.31.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/digitalocean/models/compute/ssh_keys_tests.rb
fog-1.30.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
fog-1.29.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
fog-1.28.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
fog-1.27.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
fog-1.26.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
fog-1.25.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
nsidc-fog-1.24.1 tests/digitalocean/models/compute/ssh_keys_tests.rb
fog-1.24.0 tests/digitalocean/models/compute/ssh_keys_tests.rb
ns-fog-1.22.11 tests/digitalocean/models/compute/ssh_keys_tests.rb
ns-fog-1.22.10 tests/digitalocean/models/compute/ssh_keys_tests.rb