Sha256: 2f95b32bba3b7e7afb37af5c0dff421ecd0e20df1a35fbc856b7cb2f351b4767

Contents?: true

Size: 867 Bytes

Versions: 67

Compression:

Stored size: 867 Bytes

Contents

Shindo.tests('HP::DNS | record model', ['hp', 'dns', 'record']) do

  @domain = HP[:dns].domains.create({:name => 'www.fogtest.com.', :email => 'test@fogtest.com'})

  attributes = {:domain_id => @domain.id, :name => 'www.fogtest.com.', :type => 'A', :data => '15.185.100.152'}
  model_tests(@domain.records, attributes, true)

  tests('success') do

    tests('#create').succeeds do
      attributes = {:domain_id => @domain.id, :name => 'www.fogtest.com.', :type => 'A', :data => '15.185.200.152', :description => 'test record'}
      @record = HP[:dns].records.create(attributes)
      !@record.id.nil?
    end

    tests('Update via #save').succeeds do
      @record.name = 'www.fogupdate.com.'
      @record.description = 'desc for record'
      @record.save
    end

    tests('#destroy').succeeds do
      @record.destroy
    end

  end

  @domain.destroy
end

Version data entries

67 entries across 67 versions & 5 rubygems

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