Sha256: 17c0bd90d41893cc64486163f48456d11acd811967b5acca7f18b35a5f65b0ba

Contents?: true

Size: 860 Bytes

Versions: 1

Compression:

Stored size: 860 Bytes

Contents

require 'spec_helper'

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

  describe '#my_items' do
    let(:response) do
      VCR.use_cassette('item/index') { subject.index }
    end

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

    it '@body contains information of the items' do
      expect(response.body).to match(/items/)
      expect(response.body).to match(/item_id/)
      expect(response.body).to match(/title/)
      expect(response.body).to match(/detail/)
      expect(response.body).to match(/price/)
      expect(response.body).to match(/stock/)
      expect(response.body).to match(/visible/)
      expect(response.body).to match(/list_order/)
      expect(response.body).to match(/identifier/)
    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/item_spec.rb