Sha256: 2c933023a2f0678d0676af6892c92584150f9e23a3def1e5a852bd952b40f7c6
Contents?: true
Size: 978 Bytes
Versions: 18
Compression:
Stored size: 978 Bytes
Contents
require 'spec_helper' describe Contentful::Link do let(:entry) { vcr('entry') { create_client.entry('nyancat') } } let(:link) { entry.space } let(:content_type_link) { entry.content_type } describe 'SystemProperties' do it 'has a #sys getter returning a hash with symbol keys' do expect(link.sys).to be_a Hash expect(link.sys.keys.sample).to be_a Symbol end it 'has #id' do expect(link.id).to eq 'cfexampleapi' end it 'has #type' do expect(link.type).to eq 'Link' end it 'has #link_type' do expect(link.link_type).to eq 'Space' end end describe '#resolve' do it 'queries the api for the resource' do vcr('space')do expect(link.resolve).to be_a Contentful::Space end end it 'queries the api for the resource (different link object)' do vcr('content_type')do expect(content_type_link.resolve).to be_a Contentful::ContentType end end end end
Version data entries
18 entries across 18 versions & 1 rubygems