Sha256: 1bddbc192c581b82500c78f1a2e5207e75fb53a5a2f2cdcedda404ae5484be2f

Contents?: true

Size: 887 Bytes

Versions: 68

Compression:

Stored size: 887 Bytes

Contents

require 'spec_helper'

class Convection::Model::Template::Resource
  describe EC2SecurityGroup do
    let(:template) do
      Convection.template do
        description 'Elasticache Test Template'

        ec2_security_group 'MyEC2SecGroup' do
          description 'EC2 security group'

          vpc 'vpc-deadb33f'
        end
      end
    end

    subject do
      template_json
        .fetch('Resources')
        .fetch('MyEC2SecGroup')
        .fetch('Properties')
    end

    # TODO: Write more meaningful specs for EC2SecurityGroup around things like ingress/egress or the taggable mixin
    it 'has a description' do
      expect(subject['GroupDescription']).to eq('EC2 security group')
    end

    it 'has a description' do
      expect(subject['VpcId']).to eq('vpc-deadb33f')
    end

    private

    def template_json
      JSON.parse(template.to_json)
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
convection-1.1.3 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.1.2 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.1.1 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.1.0 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.0.7 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.0.6 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.0.5 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.0.4 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.0.3 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.0.2 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.0.1 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.0.0.pre.beta.10 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.0.0.pre.beta.9 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.0.0.pre.beta.8 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.0.0.pre.beta.7 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.0.0.pre.beta.6 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.0.0.pre.beta.4 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-1.0.0.pre.beta.1 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-0.4.3 spec/convection/model/template/resource/ec2_security_group_spec.rb
convection-0.4.2 spec/convection/model/template/resource/ec2_security_group_spec.rb