mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[rackspace|dns] added tests for zones.find
This commit is contained in:
parent
027567a0dc
commit
0388d4f11a
1 changed files with 22 additions and 0 deletions
22
tests/rackspace/models/dns/zones_tests.rb
Normal file
22
tests/rackspace/models/dns/zones_tests.rb
Normal file
|
@ -0,0 +1,22 @@
|
|||
Shindo.tests('Fog::Rackspace::DNS | zones', ['rackspace']) do
|
||||
pending if Fog.mocking?
|
||||
|
||||
provider = Fog::DNS[:rackspace]
|
||||
domain_sld = uniq_id
|
||||
domain_name = domain_sld + '.com'
|
||||
|
||||
begin
|
||||
zone = provider.zones.create({:domain => domain_name, :email => "hostmaster@#{domain_name}"})
|
||||
|
||||
tests("zones.find(#{domain_sld}) => finds domain_name") do
|
||||
returns(1) { provider.zones.find(domain_sld).length }
|
||||
end
|
||||
|
||||
random_name = uniq_id
|
||||
tests("zones.find(#{random_name}) => finds nothing") do
|
||||
returns(0) { provider.zones.find(random_name).length }
|
||||
end
|
||||
ensure
|
||||
zone.destroy
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue