Sha256: 6db19df05a7c1e374242b4da1beb98eb36333d044aaa8d7bc9a80b353f04de1f

Contents?: true

Size: 716 Bytes

Versions: 32

Compression:

Stored size: 716 Bytes

Contents

# frozen_string_literal: true

require 'spec_helpers/client'

RSpec.describe FinApps::REST::Products, 'initialized with valid FinApps::Client object' do
  include SpecHelpers::Client
  subject(:products) { FinApps::REST::Products.new(client) }

  describe '#list' do
    context 'when called' do
      let(:list) { subject.list }
      let(:results) { list[0] }
      let(:error_messages) { list[1] }

      it { expect { list }.not_to raise_error }
      it('returns an array of records') { expect(results).to be_a(Array) }
      it('performs a get and returns the response') { expect(results[0]).to respond_to(:code) }
      it('returns no error messages') { expect(error_messages).to be_empty }
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
finapps-5.0.3 spec/rest/products_spec.rb
finapps-5.0.2 spec/rest/products_spec.rb
finapps-5.0.1 spec/rest/products_spec.rb
finapps-5.0.0 spec/rest/products_spec.rb
finapps-4.0.16 spec/rest/products_spec.rb
finapps-4.0.15 spec/rest/products_spec.rb
finapps-4.0.14 spec/rest/products_spec.rb
finapps-4.0.12 spec/rest/products_spec.rb
finapps-4.0.11 spec/rest/products_spec.rb
finapps-4.0.10 spec/rest/products_spec.rb
finapps-4.0.9 spec/rest/products_spec.rb
finapps-4.0.8 spec/rest/products_spec.rb
finapps-4.0.7 spec/rest/products_spec.rb
finapps-4.0.6 spec/rest/products_spec.rb
finapps-4.0.5 spec/rest/products_spec.rb
finapps-4.0.4 spec/rest/products_spec.rb
finapps-4.0.3 spec/rest/products_spec.rb
finapps-4.0.2 spec/rest/products_spec.rb
finapps-4.0.1 spec/rest/products_spec.rb
finapps-3.0.7 spec/rest/products_spec.rb