Sha256: dbb16f87c00bd9fee7747759885f2d1d3b7aaae25f61292e7a2bc40e858d7759

Contents?: true

Size: 948 Bytes

Versions: 14

Compression:

Stored size: 948 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

14 entries across 14 versions & 3 rubygems

Version Path
gapinc-fog-1.12.1.2.1 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-1.14.0 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-1.13.0 tests/digitalocean/models/compute/ssh_key_tests.rb
gapinc-fog-1.12.1.2 tests/digitalocean/models/compute/ssh_key_tests.rb
gapinc-fog-1.12.1.1 tests/digitalocean/models/compute/ssh_key_tests.rb
gapinc-fog-1.12.1a tests/digitalocean/models/compute/ssh_key_tests.rb
gapinc-fog-1.12.1 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-1.12.1 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-1.12.0 tests/digitalocean/models/compute/ssh_key_tests.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/tests/digitalocean/models/compute/ssh_key_tests.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/tests/digitalocean/models/compute/ssh_key_tests.rb
fog-1.11.1 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-1.11.0 tests/digitalocean/models/compute/ssh_key_tests.rb
fog-1.10.1 tests/digitalocean/models/compute/ssh_key_tests.rb