contentful-management 2.11.0 → 2.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,28 +0,0 @@
1
- require 'spec_helper'
2
- require 'contentful/management/space'
3
- require 'contentful/management/client'
4
-
5
- module Contentful
6
- module Management
7
- describe ApiKey do
8
- let(:token) { ENV.fetch('CF_TEST_CMA_TOKEN', '<ACCESS_TOKEN>') }
9
- let(:organization_id) { 'org_id' }
10
-
11
- let!(:client) { Client.new(token ) }
12
-
13
- subject { client.api_usage(organization_id) }
14
-
15
- describe '.all' do
16
- it 'class method also works' do
17
- vcr('api_usage/all') { expect(Contentful::Management::ApiUsage.all(client, organization_id, 'organization', 1, 'cda')).to be_kind_of Contentful::Management::Array }
18
- end
19
- it 'returns a Contentful::Array' do
20
- vcr('api_usage/all') { expect(subject.all('organization', 1, 'cda')).to be_kind_of Contentful::Management::Array }
21
- end
22
- it 'builds a Contentful::Management::ApiUsage object' do
23
- vcr('api_usage/all') { expect(subject.all('organization', 1, 'cda').first).to be_kind_of Contentful::Management::ApiUsage }
24
- end
25
- end
26
- end
27
- end
28
- end
@@ -1,27 +0,0 @@
1
- require 'spec_helper'
2
- require 'contentful/management/client'
3
-
4
- module Contentful
5
- module Management
6
- describe ApiKey do
7
- let(:token) { ENV.fetch('CF_TEST_CMA_TOKEN', '<ACCESS_TOKEN>') }
8
- let(:organization_id) { 'org_id' }
9
-
10
- let!(:client) { Client.new(token ) }
11
-
12
- subject { client.usage_periods(organization_id) }
13
-
14
- describe '.all' do
15
- it 'class method also works' do
16
- vcr('usage_period/all') { expect(Contentful::Management::UsagePeriod.all(client, organization_id)).to be_kind_of Contentful::Management::Array }
17
- end
18
- it 'returns a Contentful::Array' do
19
- vcr('usage_period/all') { expect(subject.all).to be_kind_of Contentful::Management::Array }
20
- end
21
- it 'builds a Contentful::Management::UsagePeriod object' do
22
- vcr('usage_period/all') { expect(subject.all.first).to be_kind_of Contentful::Management::UsagePeriod }
23
- end
24
- end
25
- end
26
- end
27
- end