tests/models/compute/address_tests.rb in fog-aws-1.2.0 vs tests/models/compute/address_tests.rb in fog-aws-1.2.1
- old
+ new
@@ -14,11 +14,30 @@
@server.reload
@instance.server.public_ip_address == @instance.public_ip
end
end
+ tests("#change_scope") do
+ test('to vpc') do
+ @instance.change_scope
+ @instance.domain == 'vpc'
+ end
+
+ test('to classic') do
+ @instance.change_scope
+ @instance.domain == 'standard'
+ end
+
+ # merge_attributes requires this
+ @instance = Fog::Compute[:aws].addresses.get(@instance.identity)
+ end
+
@server.destroy
end
- model_tests(Fog::Compute[:aws].addresses, { :domain => "vpc" }, true)
+ model_tests(Fog::Compute[:aws].addresses, { :domain => "vpc" }, true) do
+ tests("#change_scope").raises(Fog::Compute::AWS::Error) do
+ @instance.change_scope
+ end
+ end
end