Sha256: 89acf1c576ac6f41e9cdf39e9ff818447a38df79d1c730336cb88dd68e79bee1
Contents?: true
Size: 1.13 KB
Versions: 18
Compression:
Stored size: 1.13 KB
Contents
require 'spec_helper' describe Contentful::ContentType do let(:content_type) { vcr('content_type') { create_client.content_type 'cat' } } describe 'SystemProperties' do it 'has a #sys getter returning a hash with symbol keys' do expect(content_type.sys).to be_a Hash expect(content_type.sys.keys.sample).to be_a Symbol end it 'has #id' do expect(content_type.id).to eq 'cat' end it 'has #type' do expect(content_type.type).to eq 'ContentType' end end describe 'Properties' do it 'has a #properties getter returning a hash with symbol keys' do expect(content_type.properties).to be_a Hash expect(content_type.properties.keys.sample).to be_a Symbol end it 'has #name' do expect(content_type.name).to eq 'Cat' end it 'has #description' do expect(content_type.description).to eq 'Meow.' end it 'has #fields' do expect(content_type.fields).to be_a Array expect(content_type.fields.first).to be_a Contentful::Field end it 'could have #display_field' do expect(content_type).to respond_to :display_field end end end
Version data entries
18 entries across 18 versions & 1 rubygems