Sha256: 232fd83b667e320612bb513b5426ed0d587a91875e2e7b4d7d8935f5f67dfd01

Contents?: true

Size: 717 Bytes

Versions: 1

Compression:

Stored size: 717 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 '#index' do
    let(:response) do
      VCR.use_cassette('delivery_company/index') { subject.index }
    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

1 entries across 1 versions & 1 rubygems

Version Path
base-api-client-0.3.1.beta spec/base/apis/delivery_company_spec.rb