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

24 lines
583 B
Ruby
Raw Normal View History

2012-02-25 11:35:16 -05:00
Shindo.tests("Fog::Dns[:aws] | record", ['aws', 'dns']) do
pending if Fog.mocking?
tests("zones#create").succeeds do
@zone = Fog::DNS[:aws].zones.create(:domain => generate_unique_domain)
end
params = { :name => @zone.domain, :type => 'A', :ttl => 3600, :value => ['1.2.3.4'] }
2012-02-25 11:44:46 -05:00
model_tests(@zone.records, params, false) do
tests("#modify") do
new_value = ['5.5.5.5']
returns(true) { @instance.modify(:value => new_value) }
returns(new_value) { @instance.value }
end
end
2012-02-25 11:35:16 -05:00
tests("zones#destroy").succeeds do
@zone.destroy
end
end