Sha256: 925fdfb90fd091ed219185c3077be9b38f26224fc9f3b1db72304be1ef4a3164

Contents?: true

Size: 691 Bytes

Versions: 26

Compression:

Stored size: 691 Bytes

Contents

require 'spec_helper'

describe 'DeletedAsset' do
  let(:deleted_asset)do
    vcr('sync_deleted_asset')do
      create_client.sync(initial: true, type: 'DeletedAsset').first_page.items[0]
    end
  end

  describe 'SystemProperties' do
    it 'has a #sys getter returning a hash with symbol keys' do
      expect(deleted_asset.sys).to be_a Hash
      expect(deleted_asset.sys.keys.sample).to be_a Symbol
    end

    it 'has #id' do
      expect(deleted_asset.id).to eq '5c6VY0gWg0gwaIeYkUUiqG'
    end

    it 'has #type' do
      expect(deleted_asset.type).to eq 'DeletedAsset'
    end

    it 'has #deleted_at' do
      expect(deleted_asset.created_at).to be_a DateTime
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
contentful-2.1.3 spec/deleted_asset_spec.rb
contentful-2.1.2 spec/deleted_asset_spec.rb
contentful-2.1.1 spec/deleted_asset_spec.rb
contentful-2.1.0 spec/deleted_asset_spec.rb
contentful-2.0.3 spec/deleted_asset_spec.rb
contentful-2.0.2 spec/deleted_asset_spec.rb
contentful-2.0.1 spec/deleted_asset_spec.rb
contentful-2.0.0 spec/deleted_asset_spec.rb
contentful-1.2.2 spec/deleted_asset_spec.rb
contentful-1.2.1 spec/deleted_asset_spec.rb
contentful-1.2.0 spec/deleted_asset_spec.rb
contentful-1.1.1 spec/deleted_asset_spec.rb
contentful-1.1.0 spec/deleted_asset_spec.rb
contentful-1.0.2 spec/deleted_asset_spec.rb
contentful-1.0.1 spec/deleted_asset_spec.rb
contentful-1.0.0 spec/deleted_asset_spec.rb
contentful-0.12.0 spec/deleted_asset_spec.rb
contentful-0.11.0 spec/deleted_asset_spec.rb
contentful-0.10.0 spec/deleted_asset_spec.rb
contentful-0.9.0 spec/deleted_asset_spec.rb