finapps 5.0.25 → 5.0.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ce0fc688800cfa247a62642d55c679edbe52a0a10556e359bf290b8f202351a
4
- data.tar.gz: 0b5a307b87e1b704c8fa684a98f6fcb804538d3ac6326a08ac8285f462f23556
3
+ metadata.gz: 8b136353c2e5d3fbe91062737608381a908baa5c6138c762baaabd89b53ca634
4
+ data.tar.gz: 54104334c9a5912e805b1cfcd9846e2fd33287156aa495e79b628b63a25b20d8
5
5
  SHA512:
6
- metadata.gz: 3bbddba45806a7df005d72934aff45b43a3f574bf054e63622e2e7acc39ec06bd210742cd5dc8b9684cb9d179e8b4e882cb04fa9d1d278bea81dd002f4dd89f9
7
- data.tar.gz: 2d8ac6a59586af1c7eaa3d7e3b8bcf78b7fcaca9ea7d440e07c639d7e8cc728439579eb45ff0cc78a399349b00cf6f8f4655cdc7d1834c82b95886881ab515d3
6
+ metadata.gz: d7fb1d1a3392a254bbb42ccec77b5d649274e05f8382933b1b67cca4ec004e0719f0c14a5900a9b76a1097bc94243718c5f9baa6ea81479303d492447c23e829
7
+ data.tar.gz: 4b39f05d96dfb90108a75efa12866decf7830f74e1303fa80562389485fc6448bf86be9826e60da9f1e1ee7361a4254f85d7f246764e5c115116f606fa1e2405
@@ -48,7 +48,9 @@ module FinApps
48
48
  end
49
49
 
50
50
  def build_filter(params)
51
- search_query(params[:searchTerm]) if params[:searchTerm]
51
+ return {} unless params[:searchTerm]
52
+
53
+ search_query(params[:searchTerm])
52
54
  end
53
55
 
54
56
  def search_query(term)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FinApps
4
- VERSION = '5.0.25'
4
+ VERSION = '5.0.26'
5
5
  end
@@ -62,7 +62,30 @@ RSpec.describe FinApps::REST::Consumers,
62
62
  it { expect { list }.to raise_error(FinAppsCore::InvalidArgumentsError) }
63
63
  end
64
64
 
65
- context 'when including valid params' do
65
+ context 'when including valid params without searchTerm' do
66
+ let(:params) do
67
+ {
68
+ page: 3,
69
+ requested: 19
70
+ }
71
+ end
72
+
73
+ it { expect { list }.to_not raise_error }
74
+ it('returns an array') { expect(list).to be_a(Array) }
75
+ it('performs a get and returns the response') do
76
+ expect(results).to have_key(:records)
77
+ end
78
+ it('returns no error messages') do
79
+ expect(error_messages).to be_empty
80
+ end
81
+ it 'builds query and sends proper request' do
82
+ list
83
+ url = "#{versioned_api_path}/consumers?page=3&requested=19"
84
+ expect(WebMock).to have_requested(:get, url)
85
+ end
86
+ end
87
+
88
+ context 'when including valid params with searchTerm' do
66
89
  let(:params) do
67
90
  {
68
91
  page: 2,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finapps
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.25
4
+ version: 5.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erich Quintero