Sha256: c8b719c571fb0cc8070ae742b4d5a205a9bbc6cca14b1bdcf85f516a4a317a88

Contents?: true

Size: 949 Bytes

Versions: 9

Compression:

Stored size: 949 Bytes

Contents

require 'spec_helper'
require 'contentful/management/client'

module Contentful
  module Management
    describe ApiKey do
      let(:token) { ENV.fetch('CF_TEST_CMA_TOKEN', '<ACCESS_TOKEN>') }
      let(:organization_id) { 'org_id' }

      let!(:client) { Client.new(token ) }

      subject { client.usage_periods(organization_id) }

      describe '.all' do
        it 'class method also works' do
          vcr('usage_period/all') { expect(Contentful::Management::UsagePeriod.all(client, organization_id)).to be_kind_of Contentful::Management::Array }
        end
        it 'returns a Contentful::Array' do
          vcr('usage_period/all') { expect(subject.all).to be_kind_of Contentful::Management::Array }
        end
        it 'builds a Contentful::Management::UsagePeriod object' do
          vcr('usage_period/all') { expect(subject.all.first).to be_kind_of Contentful::Management::UsagePeriod }
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
contentful-management-2.11.0 spec/lib/contentful/management/usage_period_spec.rb
contentful-management-2.10.0 spec/lib/contentful/management/usage_period_spec.rb
contentful-management-2.9.1 spec/lib/contentful/management/usage_period_spec.rb
contentful-management-2.9.0 spec/lib/contentful/management/usage_period_spec.rb
contentful-management-2.8.2 spec/lib/contentful/management/usage_period_spec.rb
contentful-management-2.8.1 spec/lib/contentful/management/usage_period_spec.rb
contentful-management-2.8.0 spec/lib/contentful/management/usage_period_spec.rb
contentful-management-2.7.0 spec/lib/contentful/management/usage_period_spec.rb
contentful-management-2.6.0 spec/lib/contentful/management/usage_period_spec.rb