Sha256: 04d1f9e5c800d25a06ddd4ebfdad20490e89621c011376aef3527f0d2df510b4

Contents?: true

Size: 457 Bytes

Versions: 44

Compression:

Stored size: 457 Bytes

Contents

require 'spec_helper'

module Convection::Model::Mixin
  describe Policy do
    let(:template) { double(:template) }
    subject { described_class.new(name: 'test-policy', template: template) }

    it 'does not set Id on #document if absent' do
      expect(subject.document['Id']).to be_nil
    end

    it 'sets Id on #document if provided' do
      subject.id('MyDocumentId')
      expect(subject.document['Id']).to eq('MyDocumentId')
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

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