Sha256: 0f63a102d5db141c3636fb0399b4aaa95e6906f75e6564f56536399353b095f7

Contents?: true

Size: 609 Bytes

Versions: 8

Compression:

Stored size: 609 Bytes

Contents

require 'spec_helper'

describe Contentful::File do
  let(:file) { vcr('asset') { create_client.asset('nyancat').file } }

  describe 'Properties' do
    it 'has #file_name' do
      expect(file.file_name).to eq 'Nyan_cat_250px_frame.png'
    end

    it 'has #content_type' do
      expect(file.content_type).to eq 'image/png'
    end

    it 'has #url' do
      expect(file.url).to eq '//images.contentful.com/cfexampleapi/4gp6taAwW4CmSgumq2ekUm/9da0cd1936871b8d72343e895a00d611/Nyan_cat_250px_frame.png'
    end

    it 'has #details' do
      expect(file.details).to be_instance_of Hash
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
contentful-2.1.3 spec/file_spec.rb
contentful-2.1.2 spec/file_spec.rb
contentful-2.1.1 spec/file_spec.rb
contentful-2.1.0 spec/file_spec.rb
contentful-2.0.3 spec/file_spec.rb
contentful-2.0.2 spec/file_spec.rb
contentful-2.0.1 spec/file_spec.rb
contentful-2.0.0 spec/file_spec.rb