Sha256: a8550fa9cb2ba3bf57c8838388072ea29afaa9e1606ce17f6477991b7c4e8cfb
Contents?: true
Size: 981 Bytes
Versions: 25
Compression:
Stored size: 981 Bytes
Contents
require 'spec_helper' require 'contentful/management/space' require 'contentful/management/client' module Contentful module Management describe Organization do let(:token) { ENV.fetch('CF_TEST_CMA_TOKEN', '<ACCESS_TOKEN>') } let!(:client) { Client.new(token) } subject { client.organizations } describe '.all' do it 'fetches the list of organizations belonging to the user' do vcr('organization/all') { organizations = subject.all expect(organizations).to be_a Contentful::Management::Array expect(organizations.first).to be_a Contentful::Management::Organization expect(organizations.first.name).to eq 'My Test Organization' expect(organizations.first.id).to be_truthy } end end describe '.find' do it 'is not supported' do expect { subject.find }.to raise_error 'Not supported' end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems