Sha256: 1248f9386d4b746a60788aee1ab088a5df2dda17433a0f1b7fdaef5263036e27

Contents?: true

Size: 1.06 KB

Versions: 16

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true

require 'spec_helpers/client'
require 'spec_helpers/api_request'

RSpec.describe FinApps::REST::PlaidAccountPermissions do
  include SpecHelpers::Client

  # noinspection RubyBlockToMethodReference
  let(:api_client) { client }

  RSpec.shared_examples 'a request that returns no content' do |_parameter|
    it('returns no content') do
      expect(subject[RESULTS]).to be_nil
    end

    it('returns no error messages') do
      expect(subject[ERROR_MESSAGES]).to be_empty
    end
  end

  describe '#create' do
    subject(:show) do
      described_class.new(api_client)
                     .create(:account_id)
    end

    it_behaves_like 'an API request'
    it_behaves_like 'a successful request'
    it_behaves_like 'a request that returns no content'
  end

  describe '#destroy' do
    subject(:destroy) do
      described_class.new(api_client)
                     .destroy(:account_id)
    end

    it_behaves_like 'an API request'
    it_behaves_like 'a successful request'
    it_behaves_like 'a request that returns no content'
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
finapps-6.13.1 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.13.0 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.12.0 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.11.0 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.10.2 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.10.1 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.10.0 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.9.2 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.9.1 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.9.0 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.8.0 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.7.1 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.7.0 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.6.1 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.6.0 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-6.5.0 spec/rest/plaid/plaid_account_permissions_spec.rb