Sha256: 48beec9b15c262fab1b1fb76510025218b535d01cb3c02666c275bbc6ddda4b6

Contents?: true

Size: 1.14 KB

Versions: 58

Compression:

Stored size: 1.14 KB

Contents

require 'spec_helper'

class Convection::Model::Template::Resource
  describe AutoScalingGroup do
    subject do
      parent = double(:template)
      allow(parent).to receive(:template).and_return(parent)

      described_class.new('MyAutoScalingGroup', parent)
    end

    it 'should not render tags when none have been defined' do
      expect(subject.render['Properties']['Tags']).to be_nil
    end

    it 'renders a regular tag' do
      subject.tag '<tag-name>', '<tag-value>'
      expect(subject.render['Properties']['Tags']).to include(a_hash_including('Key' => '<tag-name>'))
    end

    it 'renders a tag that should be propagated at launch' do
      subject.tag '<tag-name>', '<tag-value>', propagate_at_launch: true
      expect(subject.render['Properties']['Tags']).to include(a_hash_including('Key' => '<tag-name>', 'PropagateAtLaunch' => true))
    end

    it 'renders a tag that should not be propagated at launch' do
      subject.tag '<tag-name>', '<tag-value>', propagate_at_launch: false
      expect(subject.render['Properties']['Tags']).to include(a_hash_including('Key' => '<tag-name>', 'PropagateAtLaunch' => false))
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
convection-2.3.1 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.3.0 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.29 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.28.pre.beta.2 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.28.pre.beta.1 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.27 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.26 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.25 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.24 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.23 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.22 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.21 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.20 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.19 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.18 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.17 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.16 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.15 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.14 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb
convection-2.2.13 spec/convection/model/template/resource/aws_auto_scaling_auto_scaling_group_spec.rb