Sha256: ec8f370516bc37be7340d00234eaa2fd3fbba6919ea01a223e1d58244922528d

Contents?: true

Size: 946 Bytes

Versions: 44

Compression:

Stored size: 946 Bytes

Contents

Shindo.tests("Fog::Compute[:digitalocean] | ssh_key model", ['digitalocean', 'compute']) do

  service = Fog::Compute[:digitalocean]

  tests('The ssh_key model should') do

    test('#save') do
      @key = service.ssh_keys.create :name => 'fookey',
                                     :ssh_pub_key => 'fookey'
      @key.is_a? Fog::Compute::DigitalOcean::SshKey
    end

    tests('have the action') do
      test('reload') { @key.respond_to? 'reload' }
      %w{
        save
        destroy
      }.each do |action|
        test(action) { @key.respond_to? action }
      end
    end

    tests('have attributes') do
      attributes = [
        :id,
        :name,
        :ssh_pub_key
      ]

      tests("The key model should respond to") do
        attributes.each do |attribute|
          test("#{attribute}") { @key.respond_to? attribute }
        end
      end
    end

    test('#destroy') do
      @key.destroy
    end

  end

end

Version data entries

44 entries across 44 versions & 3 rubygems

Version Path
fog-1.22.0 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-1.21.0 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.20.0.20140305101305 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.19.0.20140212012611 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-1.20.0 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-1.19.0 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.18.0.20131219033443 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.18.0.20131219032002 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.18.0.20131219030716 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.18.0.20131219022322 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-maestrodev-1.18.0.20131209091424 tests/digitalocean/models/compute/ssh_key_tests.rb