Sha256: c9876fb7591033ce9f2dac8840027501dbc26666bdd8dc29d16001cf531cd107

Contents?: true

Size: 854 Bytes

Versions: 2

Compression:

Stored size: 854 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 'status is 200' do
      expect(response.status).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

2 entries across 2 versions & 1 rubygems

Version Path
base-api-client-0.3.3.beta spec/base/apis/item_spec.rb
base-api-client-0.3.2.beta spec/base/apis/item_spec.rb