Sha256: af5fdf22aed2a131956c304eb55e55ca3a58d2edbc53d052366d6ddce0606fcb

Contents?: true

Size: 1.2 KB

Versions: 25

Compression:

Stored size: 1.2 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

describe CfnDsl::CloudFormationTemplate do
  subject(:template) { described_class.new }

  describe 'Bogus Properties that are type List' do
    it 'fixes Resource property type to a List of its item type' do
      template.LakeFormation_DataLakeSettings('lake') do
        Admin { DataLakePrincipalIdentifier 'principal' }
      end
      expect(template.to_json).to include('"Type":"AWS::LakeFormation::DataLakeSettings","Properties":{"Admins":[{"DataLakePrincipalIdentifier":"principal"')
    end

    it 'fixes Subtype property Tags to a list of Tags' do
      template.AppSync_GraphQLApi('api') do
        Tag do
          Key 'tagkey'
          Value 'tagvalue'
        end
      end
      expect(template.to_json).to include('"Properties":{"Tags":[{"Key":"tagkey","Value":"tagvalue"}]}}}')
    end

    it 'fixes Subtype property type to a List of its item type' do
      template.Glue_SecurityConfiguration('glue') do
        EncryptionConfiguration do
          S3Encryption { S3EncryptionMode 'mode' }
        end
      end
      expect(template.to_json).to include('"EncryptionConfiguration":{"S3Encryptions":[{"S3EncryptionMode":"mode"}]}}}}}')
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
cfndsl-1.7.2 spec/aws/list_type_patches_spec.rb
cfndsl-1.6.0 spec/aws/list_type_patches_spec.rb
cfndsl-1.5.0 spec/aws/list_type_patches_spec.rb
cfndsl-1.4.0 spec/aws/list_type_patches_spec.rb
cfndsl-1.3.9 spec/aws/list_type_patches_spec.rb
cfndsl-1.3.8 spec/aws/list_type_patches_spec.rb
cfndsl-1.3.7 spec/aws/list_type_patches_spec.rb
cfndsl-1.3.6 spec/aws/list_type_patches_spec.rb
cfndsl-1.3.5 spec/aws/list_type_patches_spec.rb
cfndsl-1.3.4 spec/aws/list_type_patches_spec.rb
cfndsl-1.3.3 spec/aws/list_type_patches_spec.rb
cfndsl-1.3.2 spec/aws/list_type_patches_spec.rb
cfndsl-1.3.1 spec/aws/list_type_patches_spec.rb
cfndsl-1.3.0 spec/aws/list_type_patches_spec.rb
cfndsl-1.2.0 spec/aws/list_type_patches_spec.rb
cfndsl-1.1.1 spec/aws/list_type_patches_spec.rb
cfndsl-1.1.0 spec/aws/list_type_patches_spec.rb
cfndsl-1.0.6 spec/aws/list_type_patches_spec.rb
cfndsl-1.0.5 spec/aws/list_type_patches_spec.rb
cfndsl-1.0.4 spec/aws/list_type_patches_spec.rb