Sha256: 6518246fad8e12a8dcbaf71a9a97ada9fd63a2e362c70a5adcdf10936ec33f12
Contents?: true
Size: 1.54 KB
Versions: 1
Compression:
Stored size: 1.54 KB
Contents
require File.expand_path '../../test_helper', __dir__ # Test class for Traffic Manager Profile Model class TestTrafficManagerProfile < Minitest::Test def setup @service = Fog::TrafficManager::AzureRM.new(credentials) @traffic_manager_profile = traffic_manager_profile(@service) traffic_manager_client = @service.instance_variable_get(:@traffic_mgmt_client) @traffic_manager_profile_response = ApiStub::Models::TrafficManager::TrafficManagerProfile.traffic_manager_profile_response(traffic_manager_client) end def test_model_methods methods = [ :save, :destroy ] methods.each do |method| assert @traffic_manager_profile.respond_to? method end end def test_model_attributes attributes = [ :name, :id, :resource_group, :location, :profile_status, :traffic_routing_method, :relative_name, :fqdn, :ttl, :profile_monitor_status, :protocol, :port, :path, :endpoints ] attributes.each do |attribute| assert @traffic_manager_profile.respond_to? attribute end end def test_save_method_response @service.stub :create_traffic_manager_profile, @traffic_manager_profile_response do assert_instance_of Fog::TrafficManager::AzureRM::TrafficManagerProfile, @traffic_manager_profile.save end end def test_destroy_method_response @service.stub :delete_traffic_manager_profile, true do assert @traffic_manager_profile.destroy end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fog-azure-rm-0.0.5 | test/models/traffic_manager/test_traffic_manager_profile.rb |