Sha256: af5f649c3277841a8a322ea8565b922f8a730eeb21d6112bef06a686da8f4584

Contents?: true

Size: 1.09 KB

Versions: 68

Compression:

Stored size: 1.09 KB

Contents

require 'spec_helper'

class Convection::Model::Template::Resource
  describe DirectoryServiceSimpleAD do
    let(:simple_ad_template) do
      Convection.template do
        directoryservice_simple_ad 'SimpleActiveDirectory' do
          description 'Example simple AD'
          enable_sso false
          name 'ExampleSimpleAD'
          password 'directory.password'
          short_name 'directory.name'
          size 'Small'

          vpc_settings 'SubnetIds', ['subnet-deadb33f']
          vpc_settings 'VpcId', 'vpc-deadb33f'
        end
      end
    end

    it 'sets VpcSettings.SubnetIds' do
      vpc_settings = simple_ad_json.fetch('Properties').fetch('VpcSettings')
      expect(vpc_settings.fetch('SubnetIds')).to eq(['subnet-deadb33f'])
    end

    it 'sets VpcSettings.VpcId' do
      vpc_settings = simple_ad_json.fetch('Properties').fetch('VpcSettings')
      expect(vpc_settings.fetch('VpcId')).to eq('vpc-deadb33f')
    end

    private

    def simple_ad_json
      JSON.parse(simple_ad_template.to_json)
          .fetch('Resources')
          .fetch('SimpleActiveDirectory')
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
convection-0.4.1 spec/convection/model/template/resource/directoryservice_simple_ad_spec.rb
convection-0.4.0 spec/convection/model/template/resource/directoryservice_simple_ad_spec.rb
convection-0.3.3.pre.beta.1 spec/convection/model/template/resource/directoryservice_simple_ad_spec.rb
convection-0.3.2 spec/convection/model/template/resource/directoryservice_simple_ad_spec.rb
convection-0.3.1 spec/convection/model/template/resource/directoryservice_simple_ad_spec.rb
convection-0.3.0 spec/convection/model/template/resource/directoryservice_simple_ad_spec.rb
convection-0.2.34.pre.beta.1 spec/convection/model/template/resource/directoryservice_simple_ad_spec.rb
convection-0.2.33 spec/convection/model/template/resource/directoryservice_simple_ad_spec.rb