mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
25 lines
616 B
Ruby
25 lines
616 B
Ruby
Shindo.tests('HP::DNS | domain model', ['hp', 'dns', 'domain']) do
|
|
|
|
attributes = {:name => 'www.fogtest.com.', :email => 'test@fogtest.com'}
|
|
model_tests(HP[:dns].domains, attributes, true)
|
|
|
|
tests('success') do
|
|
|
|
tests('#create').succeeds do
|
|
attributes = {:name => 'www.fogtest.com.', :email => 'test@fogtest.com', :ttl => 3600}
|
|
@domain = HP[:dns].domains.create(attributes)
|
|
!@domain.id.nil?
|
|
end
|
|
|
|
tests('Update via #save').succeeds do
|
|
@domain.email = 'update@fogtest.com'
|
|
@domain.save
|
|
end
|
|
|
|
tests('#destroy').succeeds do
|
|
@domain.destroy
|
|
end
|
|
|
|
end
|
|
|
|
end
|