Sha256: 743e3ab734c066a19f080b13a8df84fa433fd87c75bdb6775a32309049b583c1
Contents?: true
Size: 962 Bytes
Versions: 22
Compression:
Stored size: 962 Bytes
Contents
# frozen_string_literal: true require 'spec_helpers/client' require 'rest/api_request' RSpec.describe FinApps::REST::PlaidWebhooks do include SpecHelpers::Client let(:api_client) { client } subject(:show) { FinApps::REST::PlaidWebhooks.new(api_client).show } describe '#show' do context 'when valid tenant token is provided' do it_behaves_like 'an API request' it_behaves_like 'a successful request' it('performs a post and returns the webhook url') do expect(show[RESULTS]).to have_key(:url) end end context 'when invalid tenant token is provided' do let(:api_client) { client(:invalid_tenant_token) } it_behaves_like 'an API request' it('results is nil') { expect(show[RESULTS]).to be_nil } it('error messages array is populated') do expect(show[ERROR_MESSAGES].first.downcase).to eq( 'invalid tenant api key or secret' ) end end end end
Version data entries
22 entries across 22 versions & 1 rubygems