Sha256: f218e0a3459ff81cb8afabe11fc9d1c10dab64fea1c8bddc5ede083b52a87306
Contents?: true
Size: 1.31 KB
Versions: 3
Compression:
Stored size: 1.31 KB
Contents
require File.expand_path '../../test_helper', __dir__ # Test class for Deployment Model class TestDeployment < Minitest::Test def setup @service = Fog::Resources::AzureRM.new(credentials) client = @service.instance_variable_get(:@rmc) @deployment = deployment(@service) @response = ApiStub::Models::Resources::Deployment.create_deployment_response(client) end def test_model_methods methods = [ :save, :destroy ] methods.each do |method| assert_respond_to @deployment, method end end def test_model_attributes attributes = [ :name, :id, :resource_group, :correlation_id, :timestamp, :outputs, :providers, :dependencies, :template_link, :parameters_link, :mode, :debug_setting, :content_version, :provisioning_state ] attributes.each do |attribute| assert_respond_to @deployment, attribute end end def test_save_method_response @service.stub :create_deployment, @response do assert_instance_of Fog::Resources::AzureRM::Deployment, @deployment.save end end def test_destroy_method_response @service.stub :delete_deployment, @response do assert @deployment.destroy end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
fog-azure-rm-0.1.1 | test/models/resources/test_deployment.rb |
fog-azure-rm-0.1.0 | test/models/resources/test_deployment.rb |
fog-azure-rm-0.0.9 | test/models/resources/test_deployment.rb |