Sha256: 47f712842d391f0ad260926fc39d404e3fb6db7673dd39568f8855514f6573f7

Contents?: true

Size: 1.14 KB

Versions: 20

Compression:

Stored size: 1.14 KB

Contents

# frozen_string_literal: true

require 'spec_helpers/client'
require 'rest/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
      FinApps::REST::PlaidAccountPermissions.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
      FinApps::REST::PlaidAccountPermissions.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

20 entries across 20 versions & 1 rubygems

Version Path
finapps-5.0.32 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.31 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.30 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.29 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.28 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.27 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.26 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.25 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.24 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.23 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.22 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.21 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.20 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.19 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.17 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.16 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.15 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.14 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.13 spec/rest/plaid/plaid_account_permissions_spec.rb
finapps-5.0.12 spec/rest/plaid/plaid_account_permissions_spec.rb