Sha256: 57049978ed1a15e9c9088762ee656ead0484c68feafbc947f4fe92da53e0411e

Contents?: true

Size: 722 Bytes

Versions: 7

Compression:

Stored size: 722 Bytes

Contents

require 'spec_helper'

RSpec.describe Base::Apis::DeliveryCompany do
  let(:client_secret) { Base::APIClient::ClientSecret.new }
  subject { Base::Apis::DeliveryCompany.new client_secret }

  describe '::new' do
    include_examples 'Base::Apis::Something.new'
  end

  describe '#request' do
    let(:response) do
      VCR.use_cassette('DeliveryCompany_request') { subject.request }
    end

    it 'contains code "200"' do
      expect(response.code).to eq '200'
    end

    it '@body contains information of the delivery companies' do
      expect(response.body).to match(/delivery_companies/)
      expect(response.body).to match(/delivery_company_id/)
      expect(response.body).to match(/name/)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
base-api-client-0.3.beta spec/base/apis/delivery_company_spec.rb
base-api-client-0.2.5.beta spec/base/apis/delivery_company_spec.rb
base-api-client-0.2.4.beta spec/base/apis/delivery_company_spec.rb
base-api-client-0.2.3.beta spec/base/apis/delivery_company_spec.rb
base-api-client-0.2.2.beta spec/base/apis/delivery_company_spec.rb
base-api-client-0.2.1.beta spec/base/apis/delivery_company_spec.rb
base-api-client-0.1.beta spec/base/apis/delivery_company_spec.rb