Sha256: 74c333ca5c824b4b73f9426bf598c967415e7b3e7d12d186ac874a026b242492

Contents?: true

Size: 715 Bytes

Versions: 6

Compression:

Stored size: 715 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

6 entries across 6 versions & 1 rubygems

Version Path
finapps-2.2.22 spec/rest/products_spec.rb
finapps-2.2.21 spec/rest/products_spec.rb
finapps-2.2.20 spec/rest/products_spec.rb
finapps-2.2.19 spec/rest/products_spec.rb
finapps-2.2.18 spec/rest/products_spec.rb
finapps-2.2.17 spec/rest/products_spec.rb